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

Commit e1e0dacb authored by Dan Carpenter's avatar Dan Carpenter Committed by Matthew Garrett
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
Acked-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent d358cb55
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
			}
		}