From eec79de5cbcfaec29c7e8e9cb7edcdc1824c24de Mon Sep 17 00:00:00 2001 From: Jonghwan Choi Date: Wed, 28 Sep 2011 10:50:36 +1000 Subject: [PATCH] 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 <> --- drivers/misc/fsa9480.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5