]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
driver/misc/fsa9480.c fix potential null-pointer dereference
authorJonghwan Choi <jhbird.choi@samsung.com>
Wed, 5 Oct 2011 00:43:24 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Oct 2011 07:50:54 +0000 (18:50 +1100)
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>
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;