Skip to content
Snippets Groups Projects
Commit 6b7e631b authored by Minwoo Im's avatar Minwoo Im Committed by Christoph Hellwig
Browse files

nvmet: return a specified error it subsys_alloc fails


nvmet_subsys_alloc() returns its pointer or NULL if it fails.  We can
see three different steps in this function:
  1. memory allocation
  2. argument check
  3. memory allocation for string

But now the callers of this function do not seem to handle case 2 by
returning -ENOMEM only even if it fails with an invalid parameter.

This patch specifies error codes so that caller can pass it to its own
caller.

Signed-off-by: default avatarMinwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com&gt;.>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent fc6c9730
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment