]> 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)
commitb096b2f960c69a980864db641933644c77c668a9
treebebfccfbb0353296a9b2d5c3f8e563341296d0e9
parent4cf374e6e17f64dc324ae2640ce3dc0050cbeebd
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