From: Jonghwan Choi Date: Wed, 5 Oct 2011 00:43:24 +0000 (+1100) Subject: driver/misc/fsa9480.c fix potential null-pointer dereference X-Git-Tag: next-20111011~1^2~117 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c32b41ddfabd21ed92c25cd0d82ca5e66b469a4a;p=karo-tx-linux.git driver/misc/fsa9480.c fix potential null-pointer dereference Signed-off-by: Jonghwan Choi Cc: Donggeun Kim Cc: Kyungmin Park Signed-off-by: Andrew Morton --- diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c index 27dc0d21aafa..f6586d53e1a3 100644 --- a/drivers/misc/fsa9480.c +++ b/drivers/misc/fsa9480.c @@ -400,7 +400,8 @@ static int fsa9480_irq_init(struct fsa9480_usbsw *usbsw) return ret; } - device_init_wakeup(&client->dev, pdata->wakeup); + if (pdata) + device_init_wakeup(&client->dev, pdata->wakeup); } return 0;