Xiubo Li a823e76138 led: gpio: Fix possible ZERO_SIZE_PTR pointer dereferencing error.
Since we cannot make sure the 'pdata->num_leds' will always be none
zero here, and then if it equals to zero, the kmemdup() will return
ZERO_SIZE_PTR, which equals to ((void *)16).

So this patch fix this with just doing the zero check before calling
kmemdup().

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-09-29 10:21:01 -07:00
..
2014-09-11 16:55:27 -07:00
2013-08-26 17:22:11 -07:00
2013-08-26 17:22:11 -07:00
2013-08-26 17:22:11 -07:00