From: Jonghwan Choi Date: Tue, 1 Nov 2011 00:11:09 +0000 (-0700) Subject: driver/misc/fsa9480.c fix potential null-pointer dereference X-Git-Tag: v3.2~401^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e58a0f89b25a2299374176d5c37aa89b326681e6;p=platform%2Fkernel%2Flinux-amlogic.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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c index 27dc0d2..f6586d5 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;