Re: [PATCH] sh: maple: add Maple controller as a joystick device

From: Dmitry Torokhov
Date: Sat Dec 20 2008 - 15:28:55 EST


On Saturday 20 December 2008 10:26:54 Adrian McMenamin wrote:
> +       mdev = to_maple_dev(dev);
> +       if (!mdev) {
> +               error = EINVAL;
> +               goto fail;
> +       }
> +       
> +       mdrv = to_maple_driver(dev->driver);
> +       if (!mdrv) {
> +               error = EINVAL;
> +               goto fail;
> +       }

This will never happen - to_maple_* are simple wrappers around container_of
and so the result will never be NULL but some small offset from it if dev is
NULL. I'm staying on the old version of the patch with small fixups.

--
Dmitry
èº{.nÇ+?·?®?­?+%?Ëlzwm?éb?맲æìrž?zX§»®w¥?{ayºÊ?Ú?ë,j­¢f£¢·h??àz¹®w¥¢ž ¢·Šj:+v?š?wèjØm¶?ÿŸ«?êçzZ+?ù???Ý¢j"?ú!¶iO?æ¬z·?vØ^¶m§ÿðà nÆ?àþY&?