Re: [PATCH] drm/panel: himax-hx83102: Add NULL pointer check in hx83102_get_modes

2024-09-03 Thread Doug Anderson
Hi, On Fri, Aug 23, 2024 at 9:49 AM Doug Anderson wrote: > > Hi, > > On Fri, Aug 23, 2024 at 9:35 AM Charles Han wrote: > > > > In hx83102_get_modes(), the return value of drm_mode_duplicate() > > is assigned to mode, which will lead to a possible NULL pointer > > dereference on failure of drm_m

Re: [PATCH] drm/panel: himax-hx83102: Add NULL pointer check in hx83102_get_modes

2024-08-23 Thread Doug Anderson
Hi, On Fri, Aug 23, 2024 at 9:35 AM Charles Han wrote: > > In hx83102_get_modes(), the return value of drm_mode_duplicate() > is assigned to mode, which will lead to a possible NULL pointer > dereference on failure of drm_mode_duplicate(). Even though a > small allocation failing is basically imp

[PATCH] drm/panel: himax-hx83102: Add NULL pointer check in hx83102_get_modes

2024-08-23 Thread Charles Han
In hx83102_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a possible NULL pointer dereference on failure of drm_mode_duplicate(). Even though a small allocation failing is basically impossible, kernel policy is still to check for NULL so add the check.