]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: xilinx-ams: fix devm_krealloc() return value check
authorMarco Pagani <marpagan@redhat.com>
Fri, 25 Nov 2022 11:31:12 +0000 (12:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:17 +0000 (11:28 +0100)
commit65966c298a5d8d1568523edbe8f0879a75ef3d24
tree67c9a4cc42b54176dddf228475a3eb7ea2de83a2
parentdd64543bd89a78021bf9247886a7c2a24bdd0f5e
iio: adc: xilinx-ams: fix devm_krealloc() return value check

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: 2abafc0ce6f6 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Marco Pagani <marpagan@redhat.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20221125113112.219290-1-marpagan@redhat.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/xilinx-ams.c