Commit dd3c8f4
mtd: rawnand: qcom: Handle unsupported opcode in qcom_op_cmd_mapping()
Handle the scenario where the caller has passed an unsupported opcode to
qcom_op_cmd_mapping(). In that case, log the error and return the
-EOPNOTSUPP errono. Also, let's propagate this error code all the way up.
This also fixes the following smatch warning:
drivers/mtd/nand/raw/qcom_nandc.c:2941 qcom_op_cmd_mapping() error: uninitialized symbol 'ret'.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202308032022.SnXkKyFs-lkp@intel.com/
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230805174146.57006-4-manivannan.sadhasivam@linaro.org1 parent d68b7e5 commit dd3c8f4
1 file changed
Lines changed: 27 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2585 | 2585 | | |
2586 | 2586 | | |
2587 | 2587 | | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
2588 | 2591 | | |
2589 | 2592 | | |
2590 | 2593 | | |
2591 | 2594 | | |
2592 | 2595 | | |
2593 | 2596 | | |
2594 | | - | |
| 2597 | + | |
2595 | 2598 | | |
2596 | 2599 | | |
2597 | 2600 | | |
2598 | 2601 | | |
2599 | 2602 | | |
2600 | 2603 | | |
2601 | | - | |
| 2604 | + | |
2602 | 2605 | | |
2603 | 2606 | | |
2604 | 2607 | | |
| |||
2608 | 2611 | | |
2609 | 2612 | | |
2610 | 2613 | | |
2611 | | - | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
2612 | 2619 | | |
2613 | 2620 | | |
2614 | 2621 | | |
| |||
2641 | 2648 | | |
2642 | 2649 | | |
2643 | 2650 | | |
| 2651 | + | |
| 2652 | + | |
2644 | 2653 | | |
2645 | 2654 | | |
2646 | 2655 | | |
| |||
2689 | 2698 | | |
2690 | 2699 | | |
2691 | 2700 | | |
2692 | | - | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
2693 | 2704 | | |
2694 | 2705 | | |
2695 | 2706 | | |
| |||
2749 | 2760 | | |
2750 | 2761 | | |
2751 | 2762 | | |
2752 | | - | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
2753 | 2766 | | |
2754 | 2767 | | |
2755 | 2768 | | |
| |||
2797 | 2810 | | |
2798 | 2811 | | |
2799 | 2812 | | |
2800 | | - | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
2801 | 2816 | | |
2802 | 2817 | | |
2803 | 2818 | | |
| |||
2843 | 2858 | | |
2844 | 2859 | | |
2845 | 2860 | | |
2846 | | - | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
2847 | 2864 | | |
2848 | 2865 | | |
2849 | 2866 | | |
| |||
2937 | 2954 | | |
2938 | 2955 | | |
2939 | 2956 | | |
2940 | | - | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
2941 | 2960 | | |
2942 | 2961 | | |
2943 | 2962 | | |
| |||
0 commit comments