On December 04, 2014 23:02, Hartmut Knaack wrote:

> > +   indio_dev = devm_iio_device_alloc(&pdev->dev,
> > +                                     sizeof(struct da9150_gpadc));
> BTW: If you use sizeof(*gpadc) instead (like it is usually done as well),
> it will perfectly fit in one line.

I preferred to be explicit that the item is a struct, but really not that fussed
either way. Also have been asked previously in a separate driver to make the
same mod you mention so will update accordingly.

> > +   ret = devm_request_threaded_irq(dev, irq, NULL, da9150_gpadc_irq,
> > +                                   IRQF_ONESHOT, "GPADC", gpadc);
> > +   if (ret) {
> > +           dev_err(dev, "Failed to request IRQ %d: %d\n", irq, ret);
> > +           goto iio_map_unreg;
> You need to return ret here, no jump to error out path.

Yes, thanks. Annoyed I missed that in the re-factor. Will fix it.

Reply via email to