Thread (8 messages) 8 messages, 2 authors, 2021-02-10
STALE1975d

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

From: Coly Li <hidden>
Date: 2021-02-10 13:58:59
Also in: linux-block
Subsystem: bcache (block layer cache), the rest · Maintainers: Coly Li, Kent Overstreet, Linus Torvalds

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

Reported-by: Dan Carpenter <redacted>
Reported-by: Reported-by: kernel test robot <redacted>
Signed-off-by: Coly Li <redacted>
Cc: Jianpeng Ma <redacted>
Cc: Qiaowei Ren <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help