Linux Device Mapper development
 help / color / mirror / Atom feed
From: Wang Sheng-Hui <shhuiw@gmail.com>
To: Alasdair Kergon <agk@redhat.com>, dm-devel@redhat.com
Subject: [PATCH] dm: cleanup: remove the unnecessary NULL set to the local var *t after kfreed in dm_table_create
Date: Fri, 04 Jan 2013 08:26:52 +0800	[thread overview]
Message-ID: <50E621CC.8040009@gmail.com> (raw)

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

                 reply	other threads:[~2013-01-04  0:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=50E621CC.8040009@gmail.com \
    --to=shhuiw@gmail.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.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