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

Fabio Estevam festevam at gmail.com
Thu Dec 13 20:58:59 EST 2012


Hi Marek,

On Thu, Dec 13, 2012 at 11:46 PM, Marek Vasut <marex at denx.de> 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?

> +
> +       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?

Regards,

Fabio Estevam



More information about the linux-arm-kernel mailing list