Commit b5d0ad61 authored by Kory Maincent (TI)'s avatar Kory Maincent (TI) Committed by Luca Ceresoli
Browse files

drm/bridge: tda998x: Return NULL instead of 0 in tda998x_edid_read()



tda998x_edid_read() returns a const struct drm_edid pointer, but when
tda998x_edid_delay_wait() fails (process killed while waiting for the
HPD timeout), the integer literal 0 is returned instead of NULL,
triggering a sparse warning: "Using plain integer as NULL pointer"

Replace 0 with NULL to fix the sparse warning.

Fixes: c76a8be4 ("drm/bridge: tda998x: Add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604172257.Imo6GOH9-lkp@intel.com/


Signed-off-by: default avatarKory Maincent (TI) <kory.maincent@bootlin.com>
Reviewed-by: default avatarLuca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patch.msgid.link/20260417155446.1068893-1-kory.maincent@bootlin.com


Signed-off-by: default avatarLuca Ceresoli <luca.ceresoli@bootlin.com>
parent 2a46a935
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1293,7 +1293,7 @@ static const struct drm_edid *tda998x_edid_read(struct tda998x_priv *priv,
	 * can't handle signals gracefully.
	 */
	if (tda998x_edid_delay_wait(priv))
		return 0;
		return NULL;

	if (priv->rev == TDA19988)
		reg_clear(priv, REG_TX4, TX4_PD_RAM);