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)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 28 Dec 2022 17:20:03 +0000 (17:20 +0000)
commit6794ed0cfcc6ce737240eccc48b3e8190df36703
treea36167c7c8fc3b7e4312e1752e91b1830b38b474
parentcbd3a0153cd18a2cbef6bf3cf31bb406c3fc9f55
iio: adc: xilinx-ams: fix devm_krealloc() return value check

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@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>
drivers/iio/adc/xilinx-ams.c