Commit e1750ba2 authored by Thomas Meyer's avatar Thomas Meyer Committed by Nicholas Bellinger

target: Use ERR_CAST inlined function

Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

The semantic patch that makes this output is available
in scripts/coccinelle/api/err_cast.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 052605c6
...@@ -268,7 +268,7 @@ struct se_tpg_np *lio_target_call_addnptotpg( ...@@ -268,7 +268,7 @@ struct se_tpg_np *lio_target_call_addnptotpg(
ISCSI_TCP); ISCSI_TCP);
if (IS_ERR(tpg_np)) { if (IS_ERR(tpg_np)) {
iscsit_put_tpg(tpg); iscsit_put_tpg(tpg);
return ERR_PTR(PTR_ERR(tpg_np)); return ERR_CAST(tpg_np);
} }
pr_debug("LIO_Target_ConfigFS: addnptotpg done!\n"); pr_debug("LIO_Target_ConfigFS: addnptotpg done!\n");
...@@ -1285,7 +1285,7 @@ struct se_wwn *lio_target_call_coreaddtiqn( ...@@ -1285,7 +1285,7 @@ struct se_wwn *lio_target_call_coreaddtiqn(
tiqn = iscsit_add_tiqn((unsigned char *)name); tiqn = iscsit_add_tiqn((unsigned char *)name);
if (IS_ERR(tiqn)) if (IS_ERR(tiqn))
return ERR_PTR(PTR_ERR(tiqn)); return ERR_CAST(tiqn);
/* /*
* Setup struct iscsi_wwn_stat_grps for se_wwn->fabric_stat_group. * Setup struct iscsi_wwn_stat_grps for se_wwn->fabric_stat_group.
*/ */
......
...@@ -481,7 +481,7 @@ static struct config_group *target_fabric_make_nodeacl( ...@@ -481,7 +481,7 @@ static struct config_group *target_fabric_make_nodeacl(
se_nacl = tf->tf_ops.fabric_make_nodeacl(se_tpg, group, name); se_nacl = tf->tf_ops.fabric_make_nodeacl(se_tpg, group, name);
if (IS_ERR(se_nacl)) if (IS_ERR(se_nacl))
return ERR_PTR(PTR_ERR(se_nacl)); return ERR_CAST(se_nacl);
nacl_cg = &se_nacl->acl_group; nacl_cg = &se_nacl->acl_group;
nacl_cg->default_groups = se_nacl->acl_default_groups; nacl_cg->default_groups = se_nacl->acl_default_groups;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment