Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0abccf77 authored by Stefan Haberland's avatar Stefan Haberland Committed by Martin Schwidefsky
Browse files

[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: default avatarStefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent cffab6bc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -948,9 +948,11 @@ 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);

	return sprintf(buf, "0\n");