driver/misc/fsa9480.c fix potential null-pointer dereference
authorJonghwan Choi <jhbird.choi@samsung.com>
Tue, 1 Nov 2011 00:11:09 +0000 (17:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 1 Nov 2011 00:30:53 +0000 (17:30 -0700)
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Cc: Donggeun Kim <dg77.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/fsa9480.c

index 27dc0d21aafa36b73955105aa6097eb5c7836352..f6586d53e1a3a6d7314fb5c3bdcf34a61e956f7c 100644 (file)
@@ -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;