Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e043046a authored by Markus Elfring's avatar Markus Elfring Committed by David S. Miller
Browse files

s390-ctcm: Delete unnecessary checks before the function call "channel_remove"



The channel_remove() function tests whether its argument is NULL
and then returns immediately. Thus the test around the calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0c59aff
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -1677,10 +1677,7 @@ static int ctcm_shutdown_device(struct ccwgroup_device *cgdev)

	ccw_device_set_offline(cgdev->cdev[1]);
	ccw_device_set_offline(cgdev->cdev[0]);

	if (priv->channel[CTCM_READ])
	channel_remove(priv->channel[CTCM_READ]);
	if (priv->channel[CTCM_WRITE])
	channel_remove(priv->channel[CTCM_WRITE]);
	priv->channel[CTCM_READ] = priv->channel[CTCM_WRITE] = NULL;