Commit e58a0f89b25a2299374176d5c37aa89b326681e6

Authored by Jonghwan Choi
Committed by Linus Torvalds
1 parent ec400c9fab

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>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

drivers/misc/fsa9480.c
... ... @@ -400,7 +400,8 @@
400 400 return ret;
401 401 }
402 402  
403   - device_init_wakeup(&client->dev, pdata->wakeup);
  403 + if (pdata)
  404 + device_init_wakeup(&client->dev, pdata->wakeup);
404 405 }
405 406  
406 407 return 0;