All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [PATCH] scsi: ufs: fix ifnullfree.cocci warnings
Date: Thu, 29 Apr 2021 02:44:11 +0800	[thread overview]
Message-ID: <20210428184411.GA35182@5835d54b1b90> (raw)
In-Reply-To: <20210428075649epcms2p61d0beff4f5d04206d66d50ccd8793d8d@epcms2p6>

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/scsi/ufs/ufshpb.c:152:3-9: WARNING: NULL check before some freeing functions is not needed.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

CC: Daejun Park <daejun7.park@samsung.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Daejun-Park/scsi-ufs-Introduce-HPB-feature/20210428-155927
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next

 ufshpb.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -148,8 +148,7 @@ static int ufshpb_alloc_region_tbl(struc
 release_srgn_table:
 	for (i = 0; i < rgn_idx; i++) {
 		rgn = rgn_table + i;
-		if (rgn->srgn_tbl)
-			kvfree(rgn->srgn_tbl);
+		kvfree(rgn->srgn_tbl);
 	}
 	kvfree(rgn_table);
 	return ret;

  parent reply	other threads:[~2021-04-28 18:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210428075614epcms2p40136d775b9c43190ae70095811c84741@epcms2p4>
2021-04-28  7:56 ` [PATCH v33 0/4] scsi: ufs: Add Host Performance Booster Support Daejun Park
     [not found]   ` <CGME20210428075614epcms2p40136d775b9c43190ae70095811c84741@epcms2p6>
2021-04-28  7:56     ` [PATCH v33 1/4] scsi: ufs: Introduce HPB feature Daejun Park
2021-04-28 18:44       ` kernel test robot
2021-04-28 18:44       ` kernel test robot [this message]
2021-04-28  7:58     ` [PATCH v33 4/4] scsi: ufs: Add HPB 2.0 support Daejun Park
     [not found]   ` <CGME20210428075614epcms2p40136d775b9c43190ae70095811c84741@epcms2p2>
2021-04-28  7:57     ` [PATCH v33 2/4] scsi: ufs: L2P map management for HPB read Daejun Park
     [not found]   ` <CGME20210428075614epcms2p40136d775b9c43190ae70095811c84741@epcms2p3>
2021-04-28  7:57     ` [PATCH v33 3/4] scsi: ufs: Prepare HPB read for cached sub-region Daejun Park

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=20210428184411.GA35182@5835d54b1b90 \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 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.