mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
nvme: fix bogus kzalloc() return check in nvme_init_effects_log()
nvme_init_effects_log() returns failure when kzalloc() is successful,
which is obviously wrong and causes failures to boot. Correct the
check.
Fixes: d4a95adeab
("nvme: Add error path for xa_store in nvme_init_effects")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
e494e45161
commit
170e086ad3
|
@ -3182,7 +3182,7 @@ static int nvme_init_effects_log(struct nvme_ctrl *ctrl,
|
||||||
struct nvme_effects_log *effects, *old;
|
struct nvme_effects_log *effects, *old;
|
||||||
|
|
||||||
effects = kzalloc(sizeof(*effects), GFP_KERNEL);
|
effects = kzalloc(sizeof(*effects), GFP_KERNEL);
|
||||||
if (effects)
|
if (!effects)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
old = xa_store(&ctrl->cels, csi, effects, GFP_KERNEL);
|
old = xa_store(&ctrl->cels, csi, effects, GFP_KERNEL);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user