Skip to content

Commit afc7a56

Browse files
committed
drivers: video: stm32: test HAL functions return value
Add missing test of some HAL functions return value. Signed-off-by: Etienne Carriere <[email protected]>
1 parent 5b1d4a9 commit afc7a56

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/video/video_stm32_dcmipp.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,12 +1201,18 @@ static int stm32_dcmipp_stream_enable(const struct device *dev)
12011201
if (ret < 0) {
12021202
LOG_ERR("Failed to start the source");
12031203
if (config->bus_type == VIDEO_BUS_TYPE_PARALLEL) {
1204-
HAL_DCMIPP_PIPE_Stop(&dcmipp->hdcmipp, pipe->id);
1204+
if (HAL_DCMIPP_PIPE_Stop(&dcmipp->hdcmipp, pipe->id) != HAL_OK) {
1205+
ret = -EIO;
1206+
goto out;
1207+
}
12051208
}
12061209
#if defined(STM32_DCMIPP_HAS_CSI)
12071210
else if (config->bus_type == VIDEO_BUS_TYPE_CSI2_DPHY) {
1208-
HAL_DCMIPP_CSI_PIPE_Stop(&dcmipp->hdcmipp, pipe->id,
1209-
DCMIPP_VIRTUAL_CHANNEL0);
1211+
if (HAL_DCMIPP_CSI_PIPE_Stop(&dcmipp->hdcmipp, pipe->id,
1212+
DCMIPP_VIRTUAL_CHANNEL0) != HAL_OK) {
1213+
ret = -EIO;
1214+
goto out;
1215+
}
12101216
}
12111217
#endif
12121218
else {

0 commit comments

Comments
 (0)