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: adc: at91_adc: change at91_ts_sample to return void

The return value of at91_ts_sample() is never checked by its caller.
Change the return type to void to make this explicit. The error
conditions are already logged via dev_err() which provides sufficient
visibility into hardware issues.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
70a9ae59 76878a38

+3 -5
+3 -5
drivers/iio/adc/at91_adc.c
··· 304 304 } 305 305 } 306 306 307 - static int at91_ts_sample(struct iio_dev *idev) 307 + static void at91_ts_sample(struct iio_dev *idev) 308 308 { 309 309 struct at91_adc_state *st = iio_priv(idev); 310 310 unsigned int xscale, yscale, reg, z1, z2; ··· 323 323 xscale = (reg >> 16) & xyz_mask; 324 324 if (xscale == 0) { 325 325 dev_err(&idev->dev, "Error: xscale == 0!\n"); 326 - return -1; 326 + return; 327 327 } 328 328 x /= xscale; 329 329 ··· 334 334 yscale = (reg >> 16) & xyz_mask; 335 335 if (yscale == 0) { 336 336 dev_err(&idev->dev, "Error: yscale == 0!\n"); 337 - return -1; 337 + return; 338 338 } 339 339 y /= yscale; 340 340 ··· 363 363 } else { 364 364 dev_dbg(&idev->dev, "pressure too low: not reporting\n"); 365 365 } 366 - 367 - return 0; 368 366 } 369 367 370 368 static irqreturn_t at91_adc_rl_interrupt(int irq, void *private)