[PATCH] drm/bridge: it6505: Fix potential NULL dereference
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Sun Jun 9 19:33:00 UTC 2024
On Sat, Jun 08, 2024 at 05:21:08PM +0300, Dan Carpenter wrote:
> Smatch complains correctly that the NULL checking isn't consistent:
>
> drivers/gpu/drm/bridge/ite-it6505.c:2583 it6505_poweron()
> error: we previously assumed 'pdata->pwr18' could be null
> (see line 2569)
>
> Add a NULL check to prevent a NULL dereference on the error path.
>
> Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
> Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
> ---
> drivers/gpu/drm/bridge/ite-it6505.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
--
With best wishes
Dmitry
More information about the dri-devel
mailing list