* [PATCH] mtd: maps: Remove redundant NULL check before kfree
@ 2013-02-26 19:46 ` Syam Sidhardhan
0 siblings, 0 replies; 4+ messages in thread
From: Syam Sidhardhan @ 2013-02-26 19:46 UTC (permalink / raw)
To: linux-mtd, linux-kernel; +Cc: syamsidhardh, dwmw2
kfree on NULL pointer is a no-op.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
drivers/mtd/maps/ck804xrom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c
index 586a1c7..0455166 100644
--- a/drivers/mtd/maps/ck804xrom.c
+++ b/drivers/mtd/maps/ck804xrom.c
@@ -308,8 +308,7 @@ static int ck804xrom_init_one(struct pci_dev *pdev,
out:
/* Free any left over map structures */
- if (map)
- kfree(map);
+ kfree(map);
/* See if I have any map structures */
if (list_empty(&window->maps)) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mtd: maps: Remove redundant NULL check before kfree
@ 2013-02-26 19:46 ` Syam Sidhardhan
0 siblings, 0 replies; 4+ messages in thread
From: Syam Sidhardhan @ 2013-02-26 19:46 UTC (permalink / raw)
To: linux-mtd, linux-kernel; +Cc: dwmw2, syamsidhardh
kfree on NULL pointer is a no-op.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
drivers/mtd/maps/ck804xrom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c
index 586a1c7..0455166 100644
--- a/drivers/mtd/maps/ck804xrom.c
+++ b/drivers/mtd/maps/ck804xrom.c
@@ -308,8 +308,7 @@ static int ck804xrom_init_one(struct pci_dev *pdev,
out:
/* Free any left over map structures */
- if (map)
- kfree(map);
+ kfree(map);
/* See if I have any map structures */
if (list_empty(&window->maps)) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: maps: Remove redundant NULL check before kfree
2013-02-26 19:46 ` Syam Sidhardhan
@ 2013-03-08 13:18 ` Artem Bityutskiy
-1 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2013-03-08 13:18 UTC (permalink / raw)
To: Syam Sidhardhan; +Cc: linux-mtd, linux-kernel, dwmw2
On Wed, 2013-02-27 at 01:16 +0530, Syam Sidhardhan wrote:
> kfree on NULL pointer is a no-op.
>
> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: maps: Remove redundant NULL check before kfree
@ 2013-03-08 13:18 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2013-03-08 13:18 UTC (permalink / raw)
To: Syam Sidhardhan; +Cc: dwmw2, linux-mtd, linux-kernel
On Wed, 2013-02-27 at 01:16 +0530, Syam Sidhardhan wrote:
> kfree on NULL pointer is a no-op.
>
> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-08 13:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 19:46 [PATCH] mtd: maps: Remove redundant NULL check before kfree Syam Sidhardhan
2013-02-26 19:46 ` Syam Sidhardhan
2013-03-08 13:18 ` Artem Bityutskiy
2013-03-08 13:18 ` Artem Bityutskiy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.