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

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
......@@ -1677,11 +1677,8 @@ 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]);
channel_remove(priv->channel[CTCM_READ]);
channel_remove(priv->channel[CTCM_WRITE]);
priv->channel[CTCM_READ] = priv->channel[CTCM_WRITE] = NULL;
return 0;
......
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