mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
nvmet: fix an error code
We accidentally return zero here when ERR_PTR(-ENOMEM) is intended.
Fixes: a07b4970f4
('nvmet: add a generic NVMe target')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
1fb4704084
commit
f98d9ca17f
1 changed files with 2 additions and 2 deletions
|
@ -737,7 +737,7 @@ static struct config_group *nvmet_referral_make(
|
|||
|
||||
port = kzalloc(sizeof(*port), GFP_KERNEL);
|
||||
if (!port)
|
||||
return ERR_CAST(port);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
INIT_LIST_HEAD(&port->entry);
|
||||
config_group_init_type_name(&port->group, name, &nvmet_referral_type);
|
||||
|
@ -794,7 +794,7 @@ static struct config_group *nvmet_ports_make(struct config_group *group,
|
|||
|
||||
port = kzalloc(sizeof(*port), GFP_KERNEL);
|
||||
if (!port)
|
||||
return ERR_CAST(port);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
INIT_LIST_HEAD(&port->entry);
|
||||
INIT_LIST_HEAD(&port->subsystems);
|
||||
|
|
Loading…
Add table
Reference in a new issue