linux/drivers/target
Peter Senna Tschudin 37bb7899ca 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>
2012-09-17 18:09:56 -07:00
..
iscsi target/iscsi: Don't log "iSCSI Login negotiation failed." twice 2012-09-17 17:13:35 -07:00
loopback target: Simplify fabric sense data length handling 2012-09-17 17:12:58 -07:00
sbp target: use list_move_tail instead of list_del/list_add_tail 2012-09-17 17:13:36 -07:00
tcm_fc tcm_fc: move the dereference below the NULL test 2012-09-17 18:04:09 -07:00
Kconfig sbp-target: Initial merge of firewire/ieee-1394 target mode support 2012-05-09 15:25:17 -07:00
Makefile target: move code for CDB emulation 2012-07-16 17:27:45 -07:00
target_core_alua.c target: Fix minor spelling typos in drivers/target 2012-09-17 17:13:31 -07:00
target_core_alua.h target: Add MI_REPORT_TARGET_PGS ext. header + implict_trans_secs attribute 2012-05-17 00:45:58 -07:00
target_core_configfs.c target: fix return code in target_core_init_configfs error path 2012-09-17 18:09:56 -07:00
target_core_device.c target: Drop se_subsystem_api->[write_cache,fua_write]_emulated flags 2012-09-17 17:13:34 -07:00
target_core_fabric_configfs.c target: remove unused including <generated/utsrelease.h> 2012-09-17 17:13:34 -07:00
target_core_fabric_lib.c target: Fix minor spelling typos in drivers/target 2012-09-17 17:13:31 -07:00
target_core_file.c target: Drop se_subsystem_api->[write_cache,fua_write]_emulated flags 2012-09-17 17:13:34 -07:00
target_core_file.h target/file: Use O_DSYNC by default for FILEIO backends 2012-06-02 23:47:20 -07:00
target_core_hba.c
target_core_iblock.c target: do not submit a zero-bio I/O request 2012-09-17 17:13:38 -07:00
target_core_iblock.h target/iblock: Add parameter to specify read-only devices 2012-07-16 17:29:11 -07:00
target_core_internal.h target: refactor core_update_device_list_for_node() 2012-07-16 17:35:24 -07:00
target_core_pr.c target: move the dereference below the NULL test 2012-09-17 18:04:14 -07:00
target_core_pr.h target: replace ->execute_task with ->execute_cmd 2012-05-06 15:11:14 -07:00
target_core_pscsi.c target: Fix minor spelling typos in drivers/target 2012-09-17 17:13:31 -07:00
target_core_pscsi.h target: remove struct se_task 2012-05-06 15:11:26 -07:00
target_core_rd.c target: Drop se_subsystem_api->[write_cache,fua_write]_emulated flags 2012-09-17 17:13:34 -07:00
target_core_rd.h
target_core_sbc.c target: support zero allocation length in SBC commands 2012-09-17 17:13:38 -07:00
target_core_spc.c target: fix truncation of mode data, support zero allocation length 2012-09-17 17:13:37 -07:00
target_core_stat.c target: remove unused including <generated/utsrelease.h> 2012-09-17 17:13:34 -07:00
target_core_tmr.c target: replace the processing thread with a TMR work queue 2012-07-16 17:35:21 -07:00
target_core_tpg.c target: Fix minor spelling typos in drivers/target 2012-09-17 17:13:31 -07:00
target_core_transport.c target: go through normal processing for all zero-length commands 2012-09-17 17:13:39 -07:00
target_core_ua.c
target_core_ua.h