Commit 74007ae
hwmon: (xgene) Fix up error handling path mixup in 'xgene_hwmon_probe()'
Commit 2ca492e has moved the call to 'kfifo_alloc()' from after the
main 'if' statement to before it.
But it has not updated the error handling paths accordingly.
Fix all that:
- if 'kfifo_alloc()' fails we can return directly
- direct returns after 'kfifo_alloc()' must now go to 'out_mbox_free'
- 'goto out_mbox_free' must be replaced by 'goto out', otherwise the
'[pcc_]mbox_free_channel()' call will be missed.
Fixes: 2ca492e ("hwmon: (xgene) Fix crash when alarm occurs before driver probe")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>1 parent 2bd6bf0 commit 74007ae
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
| 633 | + | |
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
| 649 | + | |
| 650 | + | |
650 | 651 | | |
651 | 652 | | |
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
655 | 656 | | |
656 | 657 | | |
657 | | - | |
| 658 | + | |
| 659 | + | |
658 | 660 | | |
659 | 661 | | |
660 | 662 | | |
661 | 663 | | |
662 | 664 | | |
663 | 665 | | |
664 | 666 | | |
665 | | - | |
| 667 | + | |
| 668 | + | |
666 | 669 | | |
667 | 670 | | |
668 | 671 | | |
| |||
675 | 678 | | |
676 | 679 | | |
677 | 680 | | |
678 | | - | |
| 681 | + | |
679 | 682 | | |
680 | 683 | | |
681 | 684 | | |
682 | 685 | | |
683 | 686 | | |
684 | | - | |
| 687 | + | |
685 | 688 | | |
686 | 689 | | |
687 | 690 | | |
| |||
696 | 699 | | |
697 | 700 | | |
698 | 701 | | |
699 | | - | |
| 702 | + | |
700 | 703 | | |
701 | 704 | | |
702 | 705 | | |
703 | 706 | | |
704 | 707 | | |
705 | 708 | | |
706 | | - | |
| 709 | + | |
707 | 710 | | |
708 | 711 | | |
709 | 712 | | |
| |||
0 commit comments