提交 1b52fff0 编写于 作者: M Martin Schwidefsky 提交者: Martin Schwidefsky

[S390] tape: fix tape remove function

Fix a bug introduced with git commit dff59b64:
 -       if (cdev->dev.driver_data != NULL) {
 +       if (!dev_get_drvdata(&cdev->dev)) {
These two are not equivalent.
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 c1b283d5
......@@ -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)));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册