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

Commit fbd91616 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman
Browse files

staging: unisys: return meaningful error for visorchipset_init()



The other error paths return meaningful error codes, except for the one
when registering a device, which just returned -1. Let's return ENODEV
when it fails to register instead.

Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 03b93f08
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2316,7 +2316,7 @@ visorchipset_init(struct acpi_device *acpi_device)
	visorchipset_platform_device.dev.devt = major_dev;
	if (platform_device_register(&visorchipset_platform_device) < 0) {
		POSTCODE_LINUX_2(DEVICE_REGISTER_FAILURE_PC, DIAG_SEVERITY_ERR);
		rc = -1;
		rc = -ENODEV;
		goto cleanup;
	}
	POSTCODE_LINUX_2(CHIPSET_INIT_SUCCESS_PC, POSTCODE_SEVERITY_INFO);