From: Dan Carpenter Date: Mon, 6 Dec 2010 21:44:23 +0000 (-0500) Subject: WMI: return error if wmi_create_device() fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e1e0dacba5af2b0cd8f9043d0b937296c90bc990;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 c64eefd48c4 "WMI: embed struct device directly into wmi_block" Signed-off-by: Dan Carpenter Signed-off-by: Matthew Garrett Acked-by: Dmitry Torokhov --- diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index b8e5383eab0c..05cc79672a8b 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -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; } }