CC: [email protected] BCC: [email protected] CC: [email protected] TO: Mauro Carvalho Chehab <[email protected]> CC: [email protected] CC: Laurent Pinchart <[email protected]>
tree: git://linuxtv.org/mchehab/media-next.git master head: 47aa866f248c89b319b99ac7b21a0a961ed2264a commit: 46fb99951fe2c71adfd7f4ea4439af5ed5ebb7f7 [259/331] media: platform: place NXP drivers on a separate dir :::::: branch date: 2 days ago :::::: commit date: 6 days ago compiler: alpha-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:470:18: warning: Array index >> 'free_slot' is used before limits check. [arrayIndexThenCheck] while (slot_data[free_slot].used && free_slot < n) ^ vim +/free_slot +470 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 465 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 466 static int mxc_get_free_slot(struct mxc_jpeg_slot_data slot_data[], int n) 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 467 { 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 468 int free_slot = 0; 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 469 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 @470 while (slot_data[free_slot].used && free_slot < n) 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 471 free_slot++; 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 472 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 473 return free_slot; /* >=n when there are no more free slots */ 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 474 } 2db16c6ed72ce6 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 2021-03-11 475 :::::: The code at line 470 was first introduced by commit :::::: 2db16c6ed72ce644d5639b3ed15e5817442db4ba media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder :::::: TO: Mirela Rabulea <[email protected]> :::::: CC: Mauro Carvalho Chehab <[email protected]> -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
