diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2012-09-17 20:05:33 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-09-17 18:09:56 -0700 |
commit | 37bb7899ca366dc212b71b150e78566d04808cc0 (patch) | |
tree | 4b8385c4636e009141bf508fffccdec03d4d43bf /drivers/scsi/qla2xxx | |
parent | 609234e3b6d69315b5cd511b66435d733204e779 (diff) |
target: fix return code in target_core_init_configfs error path
This patch fixes error cases within target_core_init_configfs() to
properly set ret = -ENOMEM before jumping to the out_global exception
path.
This was originally discovered with the following Coccinelle semantic
match information:
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function. A simplified version of the semantic match
that finds this problem is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/scsi/qla2xxx')
0 files changed, 0 insertions, 0 deletions