Message ID | 20210210135657.35284-4-colyli@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] bcache: correct return value in register_nvdimm_meta() | expand |
On 2/10/21 06:01, Coly Li wrote: > 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> Looks good. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
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; }
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(-)