Skip to content

Commit cdf88a2

Browse files
Andy GroverNicholas Bellinger
Andy Grover
authored and
Nicholas Bellinger
committed
target: Eliminate else using boolean logic
Signed-off-by: Andy Grover <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
1 parent 617a0c2 commit cdf88a2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/target/target_core_tpg.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,8 @@ struct se_node_acl *core_tpg_check_initiator_node_acl(
306306
* TPG LUNs if the fabric is not explictly asking for
307307
* tpg_check_demo_mode_login_only() == 1.
308308
*/
309-
if ((tpg->se_tpg_tfo->tpg_check_demo_mode_login_only != NULL) &&
310-
(tpg->se_tpg_tfo->tpg_check_demo_mode_login_only(tpg) == 1))
311-
do { ; } while (0);
312-
else
309+
if ((tpg->se_tpg_tfo->tpg_check_demo_mode_login_only == NULL) ||
310+
(tpg->se_tpg_tfo->tpg_check_demo_mode_login_only(tpg) != 1))
313311
core_tpg_add_node_to_devs(acl, tpg);
314312

315313
spin_lock_irq(&tpg->acl_node_lock);

0 commit comments

Comments
 (0)