On Tue, Dec 6, 2016 at 10:00 PM, Peter Meerwald-Stadler <pmeerw@xxxxxxxxxx> wrote: >> --- a/drivers/iio/adc/Kconfig >> +++ b/drivers/iio/adc/Kconfig >> +static int max11100_read_raw(struct iio_dev *indio_dev, >> + struct iio_chan_spec const *chan, >> + int *val, int *val2, long mask) >> +{ >> + int ret; >> + struct max11100_state *state = iio_priv(indio_dev); >> + uint8_t buffer[3] = { 0, 0, 0 }; >> + ret = spi_read(state->spi, (void *) buffer, 3); Cast not needed. >> +static int max11100_probe(struct spi_device *spi) >> +{ >> + int ret; >> + struct iio_dev *indio_dev; >> + struct max11100_state *state; >> + >> + indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*state)); >> + if (!indio_dev) { >> + pr_err("Can't allocate iio device\n"); > > error message really needed? No, OOM will scream anyway. > >> + return -ENOMEM; >> + } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html