From: Axel Lin Date: Sun, 7 Oct 2012 16:05:36 +0000 (-0700) Subject: leds: lm355x: Return proper error for lm3556_indicator_pattern_store error path X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=14ce82e536455ace3d6ca70f77bbc2c6b25b8268;p=openwrt%2Fstaging%2Fblogic.git leds: lm355x: Return proper error for lm3556_indicator_pattern_store error path Signed-off-by: Axel Lin Acked-by: G.Shark Jeong Signed-off-by: Bryan Wu --- diff --git a/drivers/leds/leds-lm355x.c b/drivers/leds/leds-lm355x.c index 065ec015d67a..8f4e8e21ddb5 100644 --- a/drivers/leds/leds-lm355x.c +++ b/drivers/leds/leds-lm355x.c @@ -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);