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 f0b7cd343216..54d617f7df3e 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -709,11 +709,12 @@ static void bsg_kref_release_function(struct kref *kref) | |||
709 | { | 709 | { |
710 | struct bsg_class_device *bcd = | 710 | struct bsg_class_device *bcd = |
711 | container_of(kref, struct bsg_class_device, ref); | 711 | container_of(kref, struct bsg_class_device, ref); |
712 | struct device *parent = bcd->parent; | ||
712 | 713 | ||
713 | if (bcd->release) | 714 | if (bcd->release) |
714 | bcd->release(bcd->parent); | 715 | bcd->release(bcd->parent); |
715 | 716 | ||
716 | put_device(bcd->parent); | 717 | put_device(parent); |
717 | } | 718 | } |
718 | 719 | ||
719 | static int bsg_put_device(struct bsg_device *bd) | 720 | static int bsg_put_device(struct bsg_device *bd) |