Commit 9e80562
mmc: pxamci: Simplify pxamci_probe() error handling using devm APIs
This patch refactors pxamci_probe() to use devm-managed resource
allocation (e.g. devm_dma_request_chan) and dev_err_probe() for
improved readability and automatic cleanup on probe failure.
It also removes redundant NULL assignments and manual resource release
logic from pxamci_probe(), and eliminates the corresponding release
calls from pxamci_remove().
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202510041841.pRlunIfl-lkp@intel.com/
Fixes: 58c40f3 ("mmc: pxamci: Use devm_mmc_alloc_host() helper")
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Rakuram Eswaran <rakuram.e96@gmail.com>
Reviewed-by: Khalid Aziz <khalid@kernel.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>1 parent a28352c commit 9e80562
1 file changed
Lines changed: 18 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
659 | 658 | | |
660 | 659 | | |
661 | 660 | | |
| |||
703 | 702 | | |
704 | 703 | | |
705 | 704 | | |
706 | | - | |
707 | | - | |
708 | | - | |
| 705 | + | |
| 706 | + | |
709 | 707 | | |
710 | 708 | | |
711 | | - | |
712 | 709 | | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
720 | 715 | | |
721 | 716 | | |
722 | 717 | | |
723 | 718 | | |
724 | 719 | | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
730 | 723 | | |
731 | 724 | | |
732 | 725 | | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
| 726 | + | |
| 727 | + | |
737 | 728 | | |
738 | 729 | | |
739 | 730 | | |
740 | 731 | | |
741 | 732 | | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
746 | 736 | | |
747 | 737 | | |
748 | 738 | | |
| |||
759 | 749 | | |
760 | 750 | | |
761 | 751 | | |
762 | | - | |
763 | 752 | | |
764 | 753 | | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | 754 | | |
773 | 755 | | |
774 | 756 | | |
| |||
791 | 773 | | |
792 | 774 | | |
793 | 775 | | |
794 | | - | |
795 | | - | |
796 | 776 | | |
797 | 777 | | |
798 | 778 | | |
| |||
0 commit comments