Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: admv1013: replace redundant ternary operator with just len

The variable ret is being assigned a return value and non-zero error
return paths are taken at all stages. At the end of the function ret
is always zero, so the ternary operator checking for zero ret is
redundant and can be replaced with just len instead.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250507134502.254736-1-colin.i.king@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Colin Ian King and committed by
Jonathan Cameron
6cdb4009 805bbd3a

+1 -1
+1 -1
drivers/iio/frequency/admv1013.c
··· 319 319 return -EINVAL; 320 320 } 321 321 322 - return ret ? ret : len; 322 + return len; 323 323 } 324 324 325 325 static int admv1013_update_quad_filters(struct admv1013_state *st)