From patchwork Tue Nov 20 09:13:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12977 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 55D7923FC2 for ; Tue, 20 Nov 2012 09:19:31 +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 0A332A1912C for ; Tue, 20 Nov 2012 09:19:30 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7848155iej.11 for ; Tue, 20 Nov 2012 01:19:30 -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:in-reply-to:references :x-gm-message-state; bh=beBWsjdRXhuMM2EU2mrFbtAOl8xil82kmK7kt/xOjUQ=; b=Q6VQa6ImjnPtmQ4+h8zS7pcrhpMyasfwZalPksLA5yvcpJbjHX8QVMp7QQJK3hZIBC Kv7nUCXmtBuUv12YrQBB3oNcnbOFJA4V3B1kexQRhxglX7Cl3PUgouTrR8mW47Ma7l0d xvlU8yy9NBGe8mertfGGJvTOLCpdfmQUPqodDlAsbEHVpHn9yz08XPpER3jRwr0x/wA3 GeHye97+sVG9UtHWWhTofe/4K3eTqqiqb9MiXDMBAzLIfC8KbrIfTw5OnPz0LCKOMohb Ug0HHUNB48kFHptTreQCGToioB8TxkL7bVlxh437a++QNW78UPa3IcWz2s4UIqPo03Kz //IA== Received: by 10.50.187.197 with SMTP id fu5mr9203774igc.70.1353403170813; Tue, 20 Nov 2012 01:19:30 -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 n20csp290573igt; Tue, 20 Nov 2012 01:19:30 -0800 (PST) Received: by 10.66.73.105 with SMTP id k9mr6301193pav.37.1353403170175; Tue, 20 Nov 2012 01:19:30 -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 qs10si17468935pbb.280.2012.11.20.01.19.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 01:19:30 -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 hz10so2853379pad.37 for ; Tue, 20 Nov 2012 01:19:30 -0800 (PST) Received: by 10.66.87.163 with SMTP id az3mr6289576pab.62.1353403169945; Tue, 20 Nov 2012 01:19:29 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ix9sm7778744pbc.7.2012.11.20.01.19.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 01:19:29 -0800 (PST) From: Sachin Kamat To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/2] mmc: Remove redundant null check before kfree in bus.c Date: Tue, 20 Nov 2012 14:43:17 +0530 Message-Id: <1353402797-6785-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353402797-6785-1-git-send-email-sachin.kamat@linaro.org> References: <1353402797-6785-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQlzO89ie3iErrNkgTKnJ8ee9jrv1oFIYd0L1CSwkRVYbAaYqu72F2uDh2hlJX3Q30RxjczE kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat --- drivers/mmc/core/bus.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 9b68933..420cb67 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -225,8 +225,7 @@ static void mmc_release_card(struct device *dev) sdio_free_common_cis(card); - if (card->info) - kfree(card->info); + kfree(card->info); kfree(card); }