Skip to content
Commit 381e309a authored by Dan Carpenter's avatar Dan Carpenter Committed by Nicholas Bellinger
Browse files

target/iscsi: cleanup some allocation style issues



We can use kcalloc() here instead of kzalloc().  It's better style and
it has overflow checking built in.

Also -ENOMEM is the correct error code for allocation errors.  -1 means
-EPERM.  None of the callers preserve the error codes so it doesn't
matter except as a cleanup.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent bfb79eac
Loading
Loading
Loading
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