Skip to content

Commit

Permalink
[S390] tape: fix tape remove function
Browse files Browse the repository at this point in the history
Fix a bug introduced with git commit dff59b6:
 -       if (cdev->dev.driver_data != NULL) {
 +       if (!dev_get_drvdata(&cdev->dev)) {
These two are not equivalent.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky authored and Martin Schwidefsky committed Dec 7, 2009
1 parent c1b283d commit 1b52fff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/char/tape_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
Expand Down

0 comments on commit 1b52fff

Please sign in to comment.