mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check for kfree(...)
@ 2012-10-19 13:58 Sangho Yi
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Sangho Yi @ 2012-10-19 13:58 UTC (permalink / raw)
  To: prakity, aaron.lu, linus.walleij, paul.gortmaker, chuanxiao.dong, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] mmc: core: bus.c: re-aligned the line over 80 chars
  2012-10-19 13:58 [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check for kfree(...) Sangho Yi
@ 2012-10-19 13:58 ` Sangho Yi
  2012-10-19 14:53 ` [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check for kfree(...) Philip Rakity
  1 sibling, 0 replies; 3+ messages in thread
From: Sangho Yi @ 2012-10-19 13:58 UTC (permalink / raw)
  To: prakity, aaron.lu, linus.walleij, paul.gortmaker, chuanxiao.dong, cjb
  Cc: linux-kernel, linux-mmc, Sangho Yi

I made a correction on a line which has > 80 characters
also, aligned the consecutive line to meet the --strict rule.

Signed-off-by: Sangho Yi <antiroot@gmail.com>
---
 drivers/mmc/core/bus.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 420cb67..66bac9f 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -269,8 +269,8 @@ int mmc_add_card(struct mmc_card *card)
 		[UHS_DDR50_BUS_SPEED] = "DDR50 ",
 	};
 
-
-	dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host), card->rca);
+	dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host),
+		     card->rca);
 
 	switch (card->type) {
 	case MMC_TYPE_MMC:
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check for kfree(...)
  2012-10-19 13:58 [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check for kfree(...) Sangho Yi
  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 ` Philip Rakity
  1 sibling, 0 replies; 3+ messages in thread
From: Philip Rakity @ 2012-10-19 14:53 UTC (permalink / raw)
  To: Sangho Yi
  Cc: aaron.lu, linus.walleij, paul.gortmaker, chuanxiao.dong, cjb,
	linux-kernel, linux-mmc


On 19 Oct 2012, at 14:58, Sangho Yi <antiroot@gmail.com> wrote:

> 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

Reviewed-by: Philip Rakity <prakity@nvidia.com>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-19 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-19 13:58 [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check for kfree(...) Sangho Yi
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

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®