Re: [PATCH 2/3 V2] iio: mxs: Implement support for touchscreen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Fabio Estevam,

> Hi Marek,
> 
> On Thu, Dec 13, 2012 at 11:46 PM, Marek Vasut <marex@xxxxxxx> wrote:
> > +static int mxs_lradc_ts_register(struct mxs_lradc *lradc)
> > +{
> > +       struct input_dev *input;
> > +       struct device *dev = lradc->dev;
> > +       int ret;
> > +
> > +       if (!lradc->use_touchscreen)
> > +               return 0;
> 
> Shouldn't we return an error code here?

No, why ? No touchscreen present, we register nothing.

> > +
> > +       input = input_allocate_device();
> > +       if (!input) {
> > +               dev_warn(dev, "Failed to allocate TS device,
> > disabling.\n"); +               lradc->use_touchscreen =
> > MXS_LRADC_TOUCHSCREEN_NONE; +               return 0;
> > +       }
> 
> Shouldn't we return an error code here?

Yes.

> Regards,
> 
> Fabio Estevam

Best regards,
Marek Vasut
--
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


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux