提交 e1e0dacb 编写于 作者: D Dan Carpenter 提交者: Matthew Garrett

WMI: return error if wmi_create_device() fails

The break resets the retval to 0 but we want to return an error code.
This was introduced in c64eefd4 "WMI: embed struct device directly
into wmi_block"
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NMatthew Garrett <mjg@redhat.com>
Acked-by: NDmitry Torokhov <dtor@mail.ru>
上级 d358cb55
......@@ -820,7 +820,7 @@ static acpi_status parse_wdg(acpi_handle handle)
retval = wmi_create_device(&gblock[i], wblock, handle);
if (retval) {
wmi_free_devices();
break;
goto out_free_pointer;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册