Fix a couple of warning reported by sparse Signed-off-by: John Johansen <john.johansen@canonical.com>