summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tpg.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior2012-01-11 21:43:38 +0100
committerNicholas Bellinger2012-01-18 09:33:44 +0100
commit8d9efe539cf78f6a90947d47100e4a86d907750f (patch)
tree82c9981047853687f83117d65de94ba18a25f144 /drivers/target/target_core_tpg.c
parenttarget: use save/restore lock primitive in core_dec_lacl_count() (diff)
downloadkernel-qcow2-linux-8d9efe539cf78f6a90947d47100e4a86d907750f.tar.gz
kernel-qcow2-linux-8d9efe539cf78f6a90947d47100e4a86d907750f.tar.xz
kernel-qcow2-linux-8d9efe539cf78f6a90947d47100e4a86d907750f.zip
target: fix return code of core_tpg_.*_lun
- core_tpg_pre_addlun() returns always ERR_PTR() or the pointer, never NULL. The additional check for NULL in core_dev_add_lun() is not required. - core_tpg_pre_dellun() returns always ERR_PTR() or the pointer, never NULL. The check for NULL in core_dev_del_lun() is wrong. The third argument (int *) is never used, remove it. - core_dev_add_lun() returns always NULL or the pointer, never ERR_PTR. The check for IS_ERR() is not required. (nab: Convert core_dev_add_lun() use err.h macros for failure handling to be consistent with the rest of target_core_fabric_configfs.c callers) Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r--drivers/target/target_core_tpg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index b7668029bb31..06336ecd872d 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -807,8 +807,7 @@ static void core_tpg_shutdown_lun(
struct se_lun *core_tpg_pre_dellun(
struct se_portal_group *tpg,
- u32 unpacked_lun,
- int *ret)
+ u32 unpacked_lun)
{
struct se_lun *lun;