]> git.baikalelectronics.ru Git - kernel.git/commit
target/iscsi: cleanup some allocation style issues
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Apr 2012 06:33:59 +0000 (09:33 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 6 May 2012 22:02:33 +0000 (15:02 -0700)
commit973f374389b247323c6174b2f6cbd6e6c04b8aa1
treebebfccfbb0353296a9b2d5c3f8e563341296d0e9
parent93ee11cf9ea005edb73f0b8d13a626c1867a5812
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_seq_pdu_list.c