Commit ab0ed48
media: intel/ipu6: Fix an error handling path in isys_probe()
If an error occurs after a successful alloc_fw_msg_bufs() call, some
resources should be released as already done in the remove function.
Add a new free_fw_msg_bufs() function that releases what has been allocated
by alloc_fw_msg_bufs().
Also use this new function in isys_remove() to avoid some code duplication.
Fixes: f50c4ca ("media: intel/ipu6: add the main input system driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>1 parent 266b44e commit ab0ed48
1 file changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
928 | 942 | | |
929 | 943 | | |
930 | 944 | | |
| |||
1105 | 1119 | | |
1106 | 1120 | | |
1107 | 1121 | | |
1108 | | - | |
| 1122 | + | |
1109 | 1123 | | |
1110 | 1124 | | |
1111 | 1125 | | |
1112 | 1126 | | |
1113 | 1127 | | |
| 1128 | + | |
| 1129 | + | |
1114 | 1130 | | |
1115 | 1131 | | |
1116 | 1132 | | |
| |||
1137 | 1153 | | |
1138 | 1154 | | |
1139 | 1155 | | |
1140 | | - | |
1141 | 1156 | | |
1142 | 1157 | | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
| 1158 | + | |
1150 | 1159 | | |
1151 | 1160 | | |
1152 | 1161 | | |
| |||
0 commit comments