linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: linux-bcache@vger.kernel.org
Cc: linux-block@vger.kernel.org, Coly Li <colyli@suse.de>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	"Reported-by : kernel test robot" <lkp@intel.com>,
	Jianpeng Ma <jianpeng.ma@intel.com>,
	Qiaowei Ren <qiaowei.ren@intel.com>
Subject: [PATCH 4/4] bcache: fix a typo in nvme-pages.c
Date: Wed, 10 Feb 2021 21:56:57 +0800	[thread overview]
Message-ID: <20210210135657.35284-4-colyli@suse.de> (raw)
In-Reply-To: <20210210135657.35284-1-colyli@suse.de>

This patch fixes a typo in init_owner_info() which causes an invalid
pointer checking from a kazlloc().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Coly Li <colyli@suse.de>
Cc: Jianpeng Ma <jianpeng.ma@intel.com>
Cc: Qiaowei Ren <qiaowei.ren@intel.com>
---
 drivers/md/bcache/nvm-pages.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/nvm-pages.c b/drivers/md/bcache/nvm-pages.c
index 3ea27ea3dd54..9cf69dc36f3a 100644
--- a/drivers/md/bcache/nvm-pages.c
+++ b/drivers/md/bcache/nvm-pages.c
@@ -561,7 +561,7 @@ static int init_owner_info(struct bch_nvm_namespace *ns)
 				for (k = 0; k < nvm_pgalloc_recs->used; k++) {
 					rec = &nvm_pgalloc_recs->recs[k];
 					extent = kzalloc(sizeof(*extent), GFP_KERNEL);
-					if (!extents) {
+					if (!extent) {
 						mutex_unlock(&only_set->lock);
 						return -ENOMEM;
 					}
-- 
2.26.2


  parent reply	other threads:[~2021-02-10 13:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 13:56 [PATCH 1/4] bcache: correct return value in register_nvdimm_meta() Coly Li
2021-02-10 13:56 ` [PATCH 2/4] bcache: use div_u64() in init_owner_info() Coly Li
2021-02-10 19:50   ` Chaitanya Kulkarni
2021-02-10 13:56 ` [PATCH 3/4] bcache: unify code comments style in nvm-pages.c Coly Li
2021-02-10 19:49   ` Chaitanya Kulkarni
2021-02-10 13:56 ` Coly Li [this message]
2021-02-10 19:53   ` [PATCH 4/4] bcache: fix a typo in nvme-pages.c Chaitanya Kulkarni
2021-02-10 19:52 ` [PATCH 1/4] bcache: correct return value in register_nvdimm_meta() Chaitanya Kulkarni

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=20210210135657.35284-4-colyli@suse.de \
    --to=colyli@suse.de \
    --cc=dan.carpenter@oracle.com \
    --cc=jianpeng.ma@intel.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=qiaowei.ren@intel.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;
as well as URLs for NNTP newsgroup(s).