drm/fb-helper: Do the 'max_conn_count' zero check
authorXiubo Li <Li.Xiubo@freescale.com>
Mon, 10 Mar 2014 01:33:58 +0000 (09:33 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 17 Mar 2014 10:23:08 +0000 (11:23 +0100)
commit04cfe97eb11c28848d14ba8c88124da31a9f881c
tree520bfac563bb7cdcf12c1a793c26c7d20948e5c1
parent409bbf1e3da29aaf57b520e29f904db9c7c2475e
drm/fb-helper: Do the 'max_conn_count' zero check

Since we cannot make sure the 'max_conn_count' will always be none
zero from the users, and then if max_conn_count equals to zero, the
kcalloc() will return ZERO_SIZE_PTR, which equals to ((void *)16).

So this patch fix this with just doing the 'max_conn_count' zero check
in the front of drm_fb_helper_init().

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
CC: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fb_helper.c