diff options
Diffstat (limited to 'drivers/leds/leds-lm3530.c')
-rw-r--r-- | drivers/leds/leds-lm3530.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index 1e7ed2abfdcc..b26306f6724d 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c | |||
@@ -150,7 +150,7 @@ static int lm3530_get_mode_from_str(const char *str) | |||
150 | if (sysfs_streq(str, mode_map[i].mode)) | 150 | if (sysfs_streq(str, mode_map[i].mode)) |
151 | return mode_map[i].mode_val; | 151 | return mode_map[i].mode_val; |
152 | 152 | ||
153 | return -1; | 153 | return -EINVAL; |
154 | } | 154 | } |
155 | 155 | ||
156 | static void lm3530_als_configure(struct lm3530_platform_data *pdata, | 156 | static void lm3530_als_configure(struct lm3530_platform_data *pdata, |
@@ -358,7 +358,7 @@ static ssize_t lm3530_mode_set(struct device *dev, struct device_attribute | |||
358 | mode = lm3530_get_mode_from_str(buf); | 358 | mode = lm3530_get_mode_from_str(buf); |
359 | if (mode < 0) { | 359 | if (mode < 0) { |
360 | dev_err(dev, "Invalid mode\n"); | 360 | dev_err(dev, "Invalid mode\n"); |
361 | return -EINVAL; | 361 | return mode; |
362 | } | 362 | } |
363 | 363 | ||
364 | drvdata->mode = mode; | 364 | drvdata->mode = mode; |
@@ -429,13 +429,13 @@ static int __devinit lm3530_probe(struct i2c_client *client, | |||
429 | if (err < 0) { | 429 | if (err < 0) { |
430 | dev_err(&client->dev, | 430 | dev_err(&client->dev, |
431 | "Register Init failed: %d\n", err); | 431 | "Register Init failed: %d\n", err); |
432 | return -ENODEV; | 432 | return err; |
433 | } | 433 | } |
434 | } | 434 | } |
435 | err = led_classdev_register(&client->dev, &drvdata->led_dev); | 435 | err = led_classdev_register(&client->dev, &drvdata->led_dev); |
436 | if (err < 0) { | 436 | if (err < 0) { |
437 | dev_err(&client->dev, "Register led class failed: %d\n", err); | 437 | dev_err(&client->dev, "Register led class failed: %d\n", err); |
438 | return -ENODEV; | 438 | return err; |
439 | } | 439 | } |
440 | 440 | ||
441 | err = device_create_file(drvdata->led_dev.dev, &dev_attr_mode); | 441 | err = device_create_file(drvdata->led_dev.dev, &dev_attr_mode); |