From: Sangho Yi <antiroot@gmail.com>
To: prakity@nvidia.com, aaron.lu@amd.com, linus.walleij@linaro.org,
paul.gortmaker@windriver.com, chuanxiao.dong@intel.com,
cjb@laptop.org
Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
Sangho Yi <antiroot@gmail.com>
Subject: [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check for kfree(...)
Date: Fri, 19 Oct 2012 22:58:57 +0900 [thread overview]
Message-ID: <1350655138-2252-1-git-send-email-antiroot@gmail.com> (raw)
In-Reply-To: <n>
kfree(NULL) is safe so I removed the if statements for NULL check.
Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
drivers/mmc/core/bus.c | 3 +--
1 file changed, 1 insertion(+), 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);
}
--
1.7.9.5
next reply other threads:[~2012-10-19 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 13:58 Sangho Yi [this message]
2012-10-19 13:58 ` [PATCH 2/2] mmc: core: bus.c: re-aligned the line over 80 chars Sangho Yi
2012-10-19 14:53 ` [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check for kfree(...) Philip Rakity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350655138-2252-1-git-send-email-antiroot@gmail.com \
--to=antiroot@gmail.com \
--cc=aaron.lu@amd.com \
--cc=chuanxiao.dong@intel.com \
--cc=cjb@laptop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=prakity@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®