Re: [PATCH] drm: mali-dp: Add check for kzalloc

2022-12-08 Thread Liviu Dudau
Hi Jiasheng, I appreciate the effort you have put into this and I find nothing wrong with the intention of the patch. However, I don't intend to move base from being the first member of the malidp_mw_connector_state struct as it has other benefits in the code and we can use container_of() in imp

Re: [PATCH] drm: mali-dp: Add check for kzalloc

2022-12-07 Thread Jiasheng Jiang
On Wed, Dec 07, 2022 at 09:59:04PM +0800, Robin Murphy wrote: >> As kzalloc may fail and return NULL pointer, it should be better to check >> the return value in order to avoid the NULL pointer dereference in >> __drm_atomic_helper_connector_reset. > > This commit message is nonsense; if > __drm_

Re: [PATCH] drm: mali-dp: Add check for kzalloc

2022-12-07 Thread Robin Murphy
On 2022-12-07 15:29, Liviu Dudau wrote: On Wed, Dec 07, 2022 at 01:59:04PM +, Robin Murphy wrote: On 2022-12-07 09:21, Jiasheng Jiang wrote: As kzalloc may fail and return NULL pointer, it should be better to check the return value in order to avoid the NULL pointer dereference in __drm_ato

Re: [PATCH] drm: mali-dp: Add check for kzalloc

2022-12-07 Thread Liviu Dudau
On Wed, Dec 07, 2022 at 01:59:04PM +, Robin Murphy wrote: > On 2022-12-07 09:21, Jiasheng Jiang wrote: > > As kzalloc may fail and return NULL pointer, it should be better to check > > the return value in order to avoid the NULL pointer dereference in > > __drm_atomic_helper_connector_reset. >

Re: [PATCH] drm: mali-dp: Add check for kzalloc

2022-12-07 Thread Robin Murphy
On 2022-12-07 09:21, Jiasheng Jiang wrote: As kzalloc may fail and return NULL pointer, it should be better to check the return value in order to avoid the NULL pointer dereference in __drm_atomic_helper_connector_reset. This commit message is nonsense; if __drm_atomic_helper_connector_reset()

Re: [PATCH] drm: mali-dp: Add check for kzalloc

2022-12-07 Thread Liviu Dudau
On Wed, Dec 07, 2022 at 05:21:18PM +0800, Jiasheng Jiang wrote: > As kzalloc may fail and return NULL pointer, it should be better to check > the return value in order to avoid the NULL pointer dereference in > __drm_atomic_helper_connector_reset. > > Fixes: 8cbc5caf36ef ("drm: mali-dp: Add writeb