[PATCH 4/4] bcache: fix a typo in nvme-pages.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Reported-by: Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Coly Li <colyli@xxxxxxx>
Cc: Jianpeng Ma <jianpeng.ma@xxxxxxxxx>
Cc: Qiaowei Ren <qiaowei.ren@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux