From patchwork Tue Nov 20 09:13:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12976 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C05C323FC2 for ; Tue, 20 Nov 2012 09:19:28 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 71A65A19147 for ; Tue, 20 Nov 2012 09:19:28 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7848155iej.11 for ; Tue, 20 Nov 2012 01:19:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=t6eGS95MPJrQhBx7UpF5vYMD0s3bKeL4/2/iex9Mwks=; b=lwXlAZjl9YV+j4EJG7QV5hlZPZDaCA6BCp3zXQhj07j9A+ryLwDh5VSkNMrPSl8F5n ngVz1rfNM5TlZ+TcxjtoMBbncF6oaYymb1icdoeUZkoRAPqIJuT70WqVWzml/o6dw6na IfEywt+Lw0KpeyTjrjkS8Bhx5jFKTk2KumMXc+ThIOd7PsOM4ELJ1H4yR3mBCWayla1T QSViUhjjZzst6SP9+59C7bMhnrY8DdH38Pj//DamGxWYyI3ydO+B7dCcSEzImcfneIWI QQsOLjeJSnVH8BXFlMXP5rGrLTyasjqhaKWcXUPZuLC7rMOYNZwDEIRhGhA1U0428Qhd SjsQ== Received: by 10.50.173.34 with SMTP id bh2mr9228286igc.70.1353403167925; Tue, 20 Nov 2012 01:19:27 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp290569igt; Tue, 20 Nov 2012 01:19:27 -0800 (PST) Received: by 10.68.209.230 with SMTP id mp6mr46845989pbc.8.1353403167284; Tue, 20 Nov 2012 01:19:27 -0800 (PST) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id iw4si17507562pbc.111.2012.11.20.01.19.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 01:19:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f50.google.com with SMTP id hz10so2449683pad.9 for ; Tue, 20 Nov 2012 01:19:27 -0800 (PST) Received: by 10.68.189.163 with SMTP id gj3mr47219688pbc.110.1353403167048; Tue, 20 Nov 2012 01:19:27 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ix9sm7778744pbc.7.2012.11.20.01.19.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 01:19:26 -0800 (PST) From: Sachin Kamat To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/2] mmc: Remove redundant null check before kfree in sdio_bus.c Date: Tue, 20 Nov 2012 14:43:16 +0530 Message-Id: <1353402797-6785-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmCXVsJJWEp/sRZP4qWKD17Sd7xsNpBuEbba3jMVKZidydMhxfmJCYGG/WplRF+2yQiwi2T kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat --- drivers/mmc/core/sdio_bus.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index 6bf6879..fdcf9e3 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c @@ -258,8 +258,7 @@ static void sdio_release_func(struct device *dev) sdio_free_func_cis(func); - if (func->info) - kfree(func->info); + kfree(func->info); kfree(func); }