From: Stefan Haberland Date: Mon, 19 Jul 2010 07:22:36 +0000 (+0200) Subject: [S390] add missing device put X-Git-Tag: firefly_0821_release~9833^2~1403^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0abccf77402af44855da739b439d01cfb65b4bfd;p=firefly-linux-kernel-4.4.55.git [S390] add missing device put The dasd_alias_show function does not return a device reference in case the device is an alias. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 34d51dd4c539..bed7b4634ccd 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c @@ -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);