All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm: cleanup: remove the unnecessary NULL set to the local var *t after kfreed in dm_table_create
@ 2013-01-04  0:26 Wang Sheng-Hui
  0 siblings, 0 replies; only message in thread
From: Wang Sheng-Hui @ 2013-01-04  0:26 UTC (permalink / raw)
  To: Alasdair Kergon, dm-devel

If allocation fails, the local var *t is not used any more after kfreed.
Don't need to reset it to NULL. Remove the unnecesary NULL set here.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
  drivers/md/dm-table.c |    1 -
  1 file changed, 1 deletion(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index daf25d0..c95405d 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -217,7 +217,6 @@ int dm_table_create(struct dm_table **result, 
fmode_t mode,

      if (alloc_targets(t, num_targets)) {
          kfree(t);
-        t = NULL;
          return -ENOMEM;
      }

-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-04  0:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04  0:26 [PATCH] dm: cleanup: remove the unnecessary NULL set to the local var *t after kfreed in dm_table_create Wang Sheng-Hui

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.