Re: [PATCH v2] drm/fb-helper: Do the 'max_conn_count' zero check

2014-03-11 Thread Daniel Vetter
On Mon, Mar 10, 2014 at 09:33:58AM +0800, Xiubo Li wrote: > 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

Re: [PATCH v2] drm/fb-helper: Do the 'max_conn_count' zero check

2014-03-11 Thread Daniel Vetter
On Mon, Mar 10, 2014 at 09:33:58AM +0800, Xiubo Li wrote: 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

[PATCH v2] drm/fb-helper: Do the 'max_conn_count' zero check

2014-03-09 Thread Xiubo Li
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

[PATCH v2] drm/fb-helper: Do the 'max_conn_count' zero check

2014-03-09 Thread Xiubo Li
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