diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/bsg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/bsg.c b/block/bsg.c index 439940c3a1ff..93e757d7174b 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -723,11 +723,12 @@ static void bsg_kref_release_function(struct kref *kref) | |||
723 | { | 723 | { |
724 | struct bsg_class_device *bcd = | 724 | struct bsg_class_device *bcd = |
725 | container_of(kref, struct bsg_class_device, ref); | 725 | container_of(kref, struct bsg_class_device, ref); |
726 | struct device *parent = bcd->parent; | ||
726 | 727 | ||
727 | if (bcd->release) | 728 | if (bcd->release) |
728 | bcd->release(bcd->parent); | 729 | bcd->release(bcd->parent); |
729 | 730 | ||
730 | put_device(bcd->parent); | 731 | put_device(parent); |
731 | } | 732 | } |
732 | 733 | ||
733 | static int bsg_put_device(struct bsg_device *bd) | 734 | static int bsg_put_device(struct bsg_device *bd) |