]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Revert "media: stm32: dcmipp: correct error handling in dcmipp_create_subdevs"
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 27 Jun 2024 11:15:31 +0000 (13:15 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 27 Jun 2024 11:15:31 +0000 (13:15 +0200)
This reverts commit 77d32b7e2a7b2e5389b67363d25371b4b8cad140.

This patch is obviously wrong (causes array accesses at index -1),
and I caught that just too late.

drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c

index 4924ee36cfdaf522c2b2aa86ba160d089452ef30..4acc3b90d03aa5d096a550b7997894cd5fb88ff0 100644 (file)
@@ -202,7 +202,7 @@ static int dcmipp_create_subdevs(struct dcmipp_device *dcmipp)
        return 0;
 
 err_init_entity:
-       while (i-- > 0)
+       while (i > 0)
                dcmipp->pipe_cfg->ents[i - 1].release(dcmipp->entity[i - 1]);
        return ret;
 }