This is a note to let you know that I've just added the patch titled iio: adc: xilinx-ams: fix devm_krealloc() return value check to the 6.1-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: iio-adc-xilinx-ams-fix-devm_krealloc-return-value-check.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6794ed0cfcc6ce737240eccc48b3e8190df36703 Mon Sep 17 00:00:00 2001 From: Marco Pagani <marpagan@xxxxxxxxxx> Date: Fri, 25 Nov 2022 12:31:12 +0100 Subject: iio: adc: xilinx-ams: fix devm_krealloc() return value check From: Marco Pagani <marpagan@xxxxxxxxxx> commit 6794ed0cfcc6ce737240eccc48b3e8190df36703 upstream. The clang-analyzer reported a warning: "Value stored to 'ret' is never read". Fix the return value check if devm_krealloc() fails to resize ams_channels. Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver") Signed-off-by: Marco Pagani <marpagan@xxxxxxxxxx> Acked-by: Michal Simek <michal.simek@xxxxxxx> Link: https://lore.kernel.org/r/20221125113112.219290-1-marpagan@xxxxxxxxxx Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/iio/adc/xilinx-ams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/adc/xilinx-ams.c +++ b/drivers/iio/adc/xilinx-ams.c @@ -1329,7 +1329,7 @@ static int ams_parse_firmware(struct iio dev_channels = devm_krealloc(dev, ams_channels, dev_size, GFP_KERNEL); if (!dev_channels) - ret = -ENOMEM; + return -ENOMEM; indio_dev->channels = dev_channels; indio_dev->num_channels = num_channels; Patches currently in stable-queue which might be from marpagan@xxxxxxxxxx are queue-6.1/iio-adc-xilinx-ams-fix-devm_krealloc-return-value-check.patch