On Mon, Feb 12, 2018 at 04:18:26PM +0300, Dan Carpenter wrote: > I think -M is prefered for these types of diffs? Not sure. I wrote about that in the cover letter if you missed. :) > On Mon, Feb 12, 2018 at 05:24:59PM +0530, Himanshu Jha wrote: > > +static int adis16201_probe(struct spi_device *spi) > > +{ > > + struct iio_dev *indio_dev; > > + struct adis *st; > > + int ret; > > + > > + indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); > > + if (!indio_dev) > > + return -ENOMEM; > > + > > + st = iio_priv(indio_dev); > > + spi_set_drvdata(spi, indio_dev); > > + > > + indio_dev->name = spi->dev.driver->name; > > + indio_dev->dev.parent = &spi->dev; > > + indio_dev->info = &adis16201_info; > > + > > + indio_dev->channels = adis16201_channels; > > + indio_dev->num_channels = ARRAY_SIZE(adis16201_channels); > > + indio_dev->modes = INDIO_DIRECT_MODE; > > + > > + ret = adis_init(st, indio_dev, spi, &adis16201_data); > > + if (ret) > > + return ret; > > + > > + ret = adis_setup_buffer_and_trigger(st, indio_dev, NULL); > > + if (ret) > > + return ret; > > We should clean up the IRQ which we enabled in adis_init() instead of > returning directly. I'm not sure about how to do that. -- Thanks Himanshu Jha -- 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