]> git.hungrycats.org Git - linux/commit
iio: gts: Fix uninitialized symbol 'ret'
authorZicheng Qu <quzicheng@huawei.com>
Thu, 31 Oct 2024 01:45:05 +0000 (01:45 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 31 Oct 2024 21:47:23 +0000 (21:47 +0000)
commite2fb2f89faf87b681038475d093214f4cbe12ebb
tree0929abc9fc3c885584080afa3e0cf365eb668df6
parent62dd96ac9cdf2814f41cfc55ecaf22a28aad6ccb
iio: gts: Fix uninitialized symbol 'ret'

Initialize the variable ret at the time of declaration to prevent it from
being returned without a defined value. Fixes smatch warning:
drivers/iio/industrialio-gts-helper.c:256 gain_to_scaletables() error:
uninitialized symbol 'ret'.

Cc: stable@vger.kernel.org # v6.6+
Fixes: 38416c28e168 ("iio: light: Add gain-time-scale helpers")
Signed-off-by: Zicheng Qu <quzicheng@huawei.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://patch.msgid.link/20241031014505.2313035-1-quzicheng@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-gts-helper.c