]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/s390/block/dasd_devmap.c
[S390] add missing device put
[net-next-2.6.git] / drivers / s390 / block / dasd_devmap.c
index 34d51dd4c53902d79ef3c21434db61923ee79fc8..bed7b4634ccd4648f42c188d8e5e2937534b1f8e 100644 (file)
@@ -948,8 +948,10 @@ static ssize_t dasd_alias_show(struct device *dev,
        if (device->discipline && device->discipline->get_uid &&
            !device->discipline->get_uid(device, &uid)) {
                if (uid.type == UA_BASE_PAV_ALIAS ||
-                   uid.type == UA_HYPER_PAV_ALIAS)
+                   uid.type == UA_HYPER_PAV_ALIAS) {
+                       dasd_put_device(device);
                        return sprintf(buf, "1\n");
+               }
        }
        dasd_put_device(device);