Commit 494fed6
Andi Shyti
i2c: qcom-geni: Simplify error handling in probe function
Avoid repeating the error handling pattern:
geni_se_resources_off(&gi2c->se);
clk_disable_unprepare(gi2c->core_clk);
return;
Introduce a single 'goto' exit label for cleanup in case of
errors. While there are currently two distinct exit points, there
is no overlap in their handling, allowing both branches to
coexist cleanly.
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20241227223230.462395-3-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>1 parent bfb3ddf commit 494fed6
1 file changed
Lines changed: 18 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
870 | | - | |
871 | | - | |
| 870 | + | |
| 871 | + | |
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
875 | | - | |
876 | | - | |
877 | | - | |
| 875 | + | |
| 876 | + | |
878 | 877 | | |
879 | 878 | | |
880 | 879 | | |
| |||
886 | 885 | | |
887 | 886 | | |
888 | 887 | | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
| 888 | + | |
| 889 | + | |
894 | 890 | | |
895 | 891 | | |
896 | 892 | | |
| |||
902 | 898 | | |
903 | 899 | | |
904 | 900 | | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
909 | 904 | | |
910 | 905 | | |
911 | 906 | | |
| |||
942 | 937 | | |
943 | 938 | | |
944 | 939 | | |
945 | | - | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
946 | 948 | | |
947 | 949 | | |
948 | 950 | | |
| 951 | + | |
949 | 952 | | |
950 | 953 | | |
951 | 954 | | |
| |||
0 commit comments