hwmon: (ibmaem) Fix return value
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 11 Sep 2013 04:19:49 +0000 (09:49 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 11 Sep 2013 20:01:32 +0000 (13:01 -0700)
Propagate appropriate error code obtained from ipmi_create_user()
instead of hardcoding.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ibmaem.c

index e2b56a2b756c85b9e9e7aedcd76e8c7fe13f9672..632f1dc0fe1f90b3ccd85c3932d81460a7340767 100644 (file)
@@ -292,7 +292,7 @@ static int aem_init_ipmi_data(struct aem_ipmi_data *data, int iface,
                dev_err(bmc,
                        "Unable to register user with IPMI interface %d\n",
                        data->interface);
-               return -EACCES;
+               return err;
        }
 
        return 0;