Commit aea00a6c370cff79b58503c012943d6a298eb527

Authored by Devendra Naga
Committed by Linus Torvalds
1 parent 47cf076b44

drivers/video/backlight/lm3639_bl.c: remove ret = -EIO at error paths of probe

The APIs are returning correctly the err codes, no need to assign -EIO
to the ret again.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Daniel Jeong <daniel.jeong@ti.com>
Cc: G.Shark Jeong <gshark.jeong@gmail.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 4 deletions Side-by-side Diff

drivers/video/backlight/lm3639_bl.c
... ... @@ -350,14 +350,13 @@
350 350 &lm3639_bled_ops, &props);
351 351 if (IS_ERR(pchip->bled)) {
352 352 dev_err(&client->dev, "fail : backlight register\n");
353   - ret = -EIO;
  353 + ret = PTR_ERR(pchip->bled);
354 354 goto err_out;
355 355 }
356 356  
357 357 ret = device_create_file(&(pchip->bled->dev), &dev_attr_bled_mode);
358 358 if (ret < 0) {
359 359 dev_err(&client->dev, "failed : add sysfs entries\n");
360   - ret = -EIO;
361 360 goto err_bled_mode;
362 361 }
363 362  
... ... @@ -369,7 +368,6 @@
369 368 &client->dev, &pchip->cdev_flash);
370 369 if (ret < 0) {
371 370 dev_err(&client->dev, "fail : flash register\n");
372   - ret = -EIO;
373 371 goto err_flash;
374 372 }
375 373  
... ... @@ -381,7 +379,6 @@
381 379 &client->dev, &pchip->cdev_torch);
382 380 if (ret < 0) {
383 381 dev_err(&client->dev, "fail : torch register\n");
384   - ret = -EIO;
385 382 goto err_torch;
386 383 }
387 384