mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Bart Van Assche <Bart.VanAssche@sandisk.com>,
	Jens Axboe <axboe@kernel.dk>,
	Johannes Thumshirn <jthumshirn@suse.de>,
	Ming Lei <ming.lei@redhat.com>, Sagi Grimberg <sagi@grimberg.me>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 5/5] mtip32xx: Adjust an input validation check in mtip_hw_debugfs_exit()
Date: Sun, 6 Aug 2017 21:24:55 +0200	[thread overview]
Message-ID: <40d24351-3d62-e4f7-751a-637c0c3b7977@users.sourceforge.net> (raw)
In-Reply-To: <524db5d1-1411-a839-6461-7c33403c1843@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 6 Aug 2017 20:52:26 +0200

The script "checkpatch.pl" pointed information out like the following.

WARNING: debugfs_remove_recursive(NULL) is safe and this check is probably not required

Thus adjust this source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/block/mtip32xx/mtip32xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 18e634efed95..db37ff872d56 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -2572,7 +2572,7 @@ static int mtip_hw_debugfs_init(struct driver_data *dd)
 
 static void mtip_hw_debugfs_exit(struct driver_data *dd)
 {
-	if (dd->dfs_node)
+	if (dd)
 		debugfs_remove_recursive(dd->dfs_node);
 }
 
-- 
2.13.4

      parent reply	other threads:[~2017-08-06 19:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06 19:15 [PATCH 0/5] mtip32xx: Adjustments for some function implementations SF Markus Elfring
2017-08-06 19:17 ` [PATCH 1/5] mtip32xx: Delete an error message for a failed memory allocation in five functions SF Markus Elfring
2017-08-07  5:48   ` kbuild test robot
2017-08-06 19:20 ` [PATCH 2/5] mtip32xx: Improve a size determination in two functions SF Markus Elfring
2017-08-06 19:22 ` [PATCH 3/5] mtip32xx: Delete an unnecessary variable initialisation in mtip_pci_probe() SF Markus Elfring
2017-08-06 19:23 ` [PATCH 4/5] mtip32xx: Fix a typo in a comment line in mtip_hw_get_identify() SF Markus Elfring
2017-08-06 19:24 ` SF Markus Elfring [this message]

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=40d24351-3d62-e4f7-751a-637c0c3b7977@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=Bart.VanAssche@sandisk.com \
    --cc=axboe@kernel.dk \
    --cc=jthumshirn@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=sagi@grimberg.me \
    /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®