Re: [PATCH RESEND] mfd: mc13xxx: Fix null pointer dereference in mc13xxx_common_init

Alexander Shiyan
2013-11-30T09:52:37Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 815 bytes --]

> On Sat, Nov 30, 2013 at 08:55:37AM +0400, Alexander Shiyan wrote:
> > If this driver being loaded from devicetree, the pdata is NULL.
> > This cause kernel Oops when "fsl,mc13xxx-uses-codec" and/or
> > "fsl,mc13xxx-uses-touch" properties is specified.
> >
> > mc13xxx spi0.0: mc13783: rev: 3.3, fin: 0, fab: 0, icid: 2/0
> > Unable to handle kernel NULL pointer dereference at virtual address 00000018
...
> > - if (mc13xxx->flags & MC13XXX_USE_TOUCHSCREEN)
> > + if ((mc13xxx->flags & MC13XXX_USE_CODEC) && pdata)
>
> Why do we check for CODEC if the Touchscreen should be used?

Oops, my fault, copy/paste bug.
I'll send the corrected version.

---
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥