mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 18:16:44 +07:00
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: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f0c59aff88
commit
e043046a5a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user