driver/misc/fsa9480.c fix potential null-pointer dereference

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>
This commit is contained in:
Jonghwan Choi 2011-10-31 17:11:09 -07:00 committed by Linus Torvalds
parent ec400c9fab
commit e58a0f89b2
1 changed files with 2 additions and 1 deletions

View 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;