This is a note to let you know that I've just added the patch titled media: ar0521: Fix return value check in writing initial registers to the 6.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: media-ar0521-fix-return-value-check-in-writing-initial-registers.patch and it can be found in the queue-6.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 54bb7671ca6de58929b3994468c330bedb9a3b7e Mon Sep 17 00:00:00 2001 From: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> Date: Tue, 30 Aug 2022 12:32:36 +0200 Subject: media: ar0521: Fix return value check in writing initial registers From: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> commit 54bb7671ca6de58929b3994468c330bedb9a3b7e upstream. The return value from register writes is ignored apart from the last value. Fix this. Reported-by: kernel test robot <lkp@xxxxxxxxx> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/media/i2c/ar0521.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/media/i2c/ar0521.c +++ b/drivers/media/i2c/ar0521.c @@ -756,11 +756,12 @@ static int ar0521_power_on(struct device gpiod_set_value(sensor->reset_gpio, 0); usleep_range(4500, 5000); /* min 45000 clocks */ - for (cnt = 0; cnt < ARRAY_SIZE(initial_regs); cnt++) + for (cnt = 0; cnt < ARRAY_SIZE(initial_regs); cnt++) { ret = ar0521_write_regs(sensor, initial_regs[cnt].data, initial_regs[cnt].count); if (ret) goto off; + } ret = ar0521_write_reg(sensor, AR0521_REG_SERIAL_FORMAT, AR0521_REG_SERIAL_FORMAT_MIPI | Patches currently in stable-queue which might be from sakari.ailus@xxxxxxxxxxxxxxx are queue-6.0/media-ar0521-fix-error-return-code-in-ar0521_power_o.patch queue-6.0/media-ar0521-fix-return-value-check-in-writing-initial-registers.patch queue-6.0/media-ov8865-fix-an-error-handling-path-in-ov8865_pr.patch queue-6.0/media-v4l2-fix-v4l2_i2c_subdev_set_name-function-doc.patch queue-6.0/media-sun6i-mipi-csi2-depend-on-phy_sun6i_mipi_dphy.patch