leds: lm355x: Return proper error for lm3556_indicator_pattern_store error path
authorAxel Lin <axel.lin@ingics.com>
Sun, 7 Oct 2012 16:05:36 +0000 (09:05 -0700)
committerBryan Wu <cooloney@gmail.com>
Mon, 26 Nov 2012 22:28:42 +0000 (14:28 -0800)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: G.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-lm355x.c

index 065ec015d67a0e95d6d16107849ec0ddeb25811f..8f4e8e21ddb5136ce4e5a2c0404a3ab7d9130bc5 100644 (file)
@@ -408,7 +408,7 @@ static ssize_t lm3556_indicator_pattern_store(struct device *dev,
        return size;
 out:
        dev_err(chip->dev, "%s:i2c access fail to register\n", __func__);
-       return size;
+       return ret;
 }
 
 static DEVICE_ATTR(pattern, 0666, NULL, lm3556_indicator_pattern_store);