From: Benjamin Romer Date: Tue, 23 Feb 2016 15:01:55 +0000 (-0500) Subject: staging: unisys: return meaningful error for visorchipset_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fbd91616036d565054a09a2a6ba0dd5ce3c69ad3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Benjamin Romer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index a79aa2ddeef5..b75b063a6f23 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -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);