]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00276865 hwmon: mma8451: Change warning to error
authorLuwei Zhou <b45643@freescale.com>
Tue, 27 Aug 2013 09:17:28 +0000 (17:17 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 16 Jun 2014 15:28:17 +0000 (17:28 +0200)
Change the string tranform warning to error.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
drivers/hwmon/mxc_mma8451.c

index 6a5722e5fda9035af744e9bcebf27193fa983462..ddac67dd41a490197576bb8575425327d1cc2574 100644 (file)
@@ -274,8 +274,11 @@ static ssize_t mma8451_enable_store(struct device *dev,
        u8 val = 0;
 
        ret = strict_strtoul(buf, 10, &enable);
-       if (ret)
-               dev_warn(dev, "Warning when tranfser string\n");
+       if (ret) {
+               dev_err(dev, "string transform error\n");
+               return ret;
+       }
+
        mutex_lock(&mma8451_lock);
        client = mma8451_i2c_client;
        enable = (enable > 0) ? 1 : 0;
@@ -317,8 +320,11 @@ static ssize_t mma8451_position_store(struct device *dev,
        unsigned long  position;
        int ret;
        ret = strict_strtoul(buf, 10, &position);
-       if (ret)
-               dev_warn(dev, "Warning when tranfser string\n");
+       if (ret) {
+               dev_err(dev, "string transform error\n");
+               return ret;
+       }
+
        mutex_lock(&mma8451_lock);
        mma_status.position = (int)position;
        mutex_unlock(&mma8451_lock);