提交 0abccf77 编写于 作者: S Stefan Haberland 提交者: Martin Schwidefsky

[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: NStefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 cffab6bc
...@@ -948,8 +948,10 @@ static ssize_t dasd_alias_show(struct device *dev, ...@@ -948,8 +948,10 @@ static ssize_t dasd_alias_show(struct device *dev,
if (device->discipline && device->discipline->get_uid && if (device->discipline && device->discipline->get_uid &&
!device->discipline->get_uid(device, &uid)) { !device->discipline->get_uid(device, &uid)) {
if (uid.type == UA_BASE_PAV_ALIAS || 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"); return sprintf(buf, "1\n");
}
} }
dasd_put_device(device); dasd_put_device(device);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册