|
@@ -709,11 +709,12 @@ static void bsg_kref_release_function(struct kref *kref)
|
|
{
|
|
{
|
|
struct bsg_class_device *bcd =
|
|
struct bsg_class_device *bcd =
|
|
container_of(kref, struct bsg_class_device, ref);
|
|
container_of(kref, struct bsg_class_device, ref);
|
|
|
|
+ struct device *parent = bcd->parent;
|
|
|
|
|
|
if (bcd->release)
|
|
if (bcd->release)
|
|
bcd->release(bcd->parent);
|
|
bcd->release(bcd->parent);
|
|
|
|
|
|
- put_device(bcd->parent);
|
|
|
|
|
|
+ put_device(parent);
|
|
}
|
|
}
|
|
|
|
|
|
static int bsg_put_device(struct bsg_device *bd)
|
|
static int bsg_put_device(struct bsg_device *bd)
|