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

Configure Feed

Select the types of activity you want to include in your feed.

iio: frequency: admv4420: return proper error code from admv4420_calc_parameters()

Return -EINVAL instead of -1 when no valid PLL parameters solution is
found. Using standard kernel error codes ensures consistency and proper
error propagation through the call chain.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
d43795cb 7031ee94

+1 -1
+1 -1
drivers/iio/frequency/admv4420.c
··· 243 243 st->n_counter.n_counter = 1; 244 244 } 245 245 if (!sol_found) 246 - return -1; 246 + return -EINVAL; 247 247 248 248 st->n_counter.int_val = div_u64_rem(st->n_counter.n_counter, 10, &st->n_counter.frac_val); 249 249 st->n_counter.mod_val = 10;