]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - block/bsg.c
Merge commit 'v2.6.26' into bkl-removal
[mv-sheeva.git] / block / bsg.c
index dbe3ffd505ca80631488626fd042810a8b2e7bac..7c59ffaedfe0860ffc55c8f9519a991e79688514 100644 (file)
@@ -710,11 +710,12 @@ static void bsg_kref_release_function(struct kref *kref)
 {
        struct bsg_class_device *bcd =
                container_of(kref, struct bsg_class_device, ref);
+       struct device *parent = bcd->parent;
 
        if (bcd->release)
                bcd->release(bcd->parent);
 
-       put_device(bcd->parent);
+       put_device(parent);
 }
 
 static int bsg_put_device(struct bsg_device *bd)