Commit 3288757
power: supply: ab8500: Fix error handling when calling iio_read_channel_processed()
The ab8500_charger_get_[ac|vbus]_[current|voltage]() functions should
return an error code on error.
Up to now, an un-initialized value is returned.
This makes the error handling of the callers un-reliable.
Return the error code instead, to fix the issue.
Fixes: 97ab78b ("power: supply: ab8500_charger: Convert to IIO ADC")
Signed-off-by: Christophe JAILLET <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/f9f65642331c9e40aaebb888589db043db80b7eb.1719037737.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sebastian Reichel <[email protected]>1 parent ad175de commit 3288757
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
| 491 | + | |
492 | 492 | | |
| 493 | + | |
| 494 | + | |
493 | 495 | | |
494 | 496 | | |
495 | 497 | | |
| |||
540 | 542 | | |
541 | 543 | | |
542 | 544 | | |
543 | | - | |
| 545 | + | |
544 | 546 | | |
| 547 | + | |
| 548 | + | |
545 | 549 | | |
546 | 550 | | |
547 | 551 | | |
| |||
563 | 567 | | |
564 | 568 | | |
565 | 569 | | |
566 | | - | |
| 570 | + | |
567 | 571 | | |
| 572 | + | |
| 573 | + | |
568 | 574 | | |
569 | 575 | | |
570 | 576 | | |
| |||
586 | 592 | | |
587 | 593 | | |
588 | 594 | | |
589 | | - | |
| 595 | + | |
590 | 596 | | |
| 597 | + | |
| 598 | + | |
591 | 599 | | |
592 | 600 | | |
593 | 601 | | |
| |||
0 commit comments