Re: [PATCH v2] drm/bridge: it6505: remove unnecessary NULL checks

From: Robert Foss
Date: Mon Jun 10 2024 - 07:37:45 EST


On Mon, 10 Jun 2024 13:50:26 +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)
>
> These the ->pwr18 pointer is allocated during probe using the
> devm_regulator_get() function. If CONFIG_REGULATOR is disabled then,
> yes, it can return NULL but in that case regulator_enable() and
> disable() functions are no-ops so passing a NULL pointer is okay.
>
> [...]

Applied, thanks!

[1/1] drm/bridge: it6505: remove unnecessary NULL checks
(no commit info)



Rob