From: Martin Schwidefsky Date: Mon, 7 Dec 2009 11:52:02 +0000 (+0100) Subject: [S390] tape: fix tape remove function X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~27947^2~23 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1b52fff059d660d4bf83d97c389dd80f1e6aad9a;p=mirror_ubuntu-focal-kernel.git [S390] tape: fix tape remove function Fix a bug introduced with git commit dff59b64af94dc58: - if (cdev->dev.driver_data != NULL) { + if (!dev_get_drvdata(&cdev->dev)) { These two are not equivalent. Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 27503a778fcb..6311018e6543 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c @@ -665,7 +665,7 @@ tape_generic_remove(struct ccw_device *cdev) tape_cleanup_device(device); } - if (!dev_get_drvdata(&cdev->dev)) { + if (dev_get_drvdata(&cdev->dev)) { sysfs_remove_group(&cdev->dev.kobj, &tape_attr_group); dev_set_drvdata(&cdev->dev, tape_put_device(dev_get_drvdata(&cdev->dev))); }