drivers: bcm2835_isp: Fix div by 0 bug.
authorNaushir Patuck <naush@raspberrypi.com>
Thu, 25 Nov 2021 08:59:58 +0000 (08:59 +0000)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Thu, 25 Nov 2021 09:54:57 +0000 (09:54 +0000)
Fix a possible division by 0 bug when setting up the mmal port for the stats
port.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
drivers/staging/vc04_services/bcm2835-isp/bcm2835-isp-fmts.h

index f6d6c88..a545dbf 100644 (file)
@@ -544,6 +544,7 @@ static const struct bcm2835_isp_fmt supported_formats[] = {
                .step_size          = 2,
        }, {
                .fourcc             = V4L2_META_FMT_BCM2835_ISP_STATS,
+               .depth              = 8,
                .mmal_fmt           = MMAL_ENCODING_BRCM_STATS,
                /* The rest are not valid fields for stats. */
        }