lkml.org 
[lkml]   [2021]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] pstore/blk: Fix return value check in pstore_blk_init()
Date
Fix the return value check which testing the wrong variable
in pstore_blk_init().

Signed-off-by: Pu Lehui <pulehui@huawei.com>
---
fs/pstore/blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/pstore/blk.c b/fs/pstore/blk.c
index ccfb11ee4d50..d5e22e6209a6 100644
--- a/fs/pstore/blk.c
+++ b/fs/pstore/blk.c
@@ -287,7 +287,7 @@ static int __init pstore_blk_init(void)
struct pstore_device_info *best_effort_dev;

best_effort_dev = kzalloc(sizeof(*best_effort_dev), GFP_KERNEL);
- if (!best_effort) {
+ if (!best_effort_dev) {
ret = -ENOMEM;
goto unlock;
}
--
2.17.1
\
 
 \ /
  Last update: 2021-06-17 02:55    [W:0.243 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site