drm/bridge: add a driver for T-Head TH1520 HDMI controller
Hello Icenowy Zheng,
Commit 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller") from Jan 29, 2026 (linux-next), leads to the following Smatch static checker warning:
drivers/gpu/drm/bridge/th1520-dw-hdmi.c:139 th1520_dw_hdmi_probe() warn: 'hdmi' isn't an ERR_PTR
drivers/gpu/drm/bridge/th1520-dw-hdmi.c
133 plat_data->output_port = 1;
134 plat_data->mode_valid = th1520_hdmi_mode_valid;
135 plat_data->configure_phy = th1520_hdmi_phy_configure;
136 plat_data->priv_data = hdmi;
137
138 hdmi->dw_hdmi = dw_hdmi_probe(pdev, plat_data);
--> 139 if (IS_ERR(hdmi))
140 return PTR_ERR(hdmi);s/hdmi/hdmi->dw_hdmi/
141
142 platform_set_drvdata(pdev, hdmi);
143
144 return 0;
145 }This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
Quoted 20 lines · 在 2026-04-10五的 13:11 +0300,Dan Carpenter写道:
Hello Icenowy Zheng,
Commit
96f30ee0fb9d("drm/bridge: add a driver for T-Head TH1520 HDMI controller") from Jan 29, 2026 (linux-next), leads to the following Smatch static checker warning:drivers/gpu/drm/bridge/th1520-dw-hdmi.c:139
th1520_dw_hdmi_probe()
warn: 'hdmi' isn't anERR_PTR
drivers/gpu/drm/bridge/th1520-dw-hdmi.c
133plat_data->output_port= 1;
134plat_data->mode_valid=th1520_hdmi_mode_valid; 135plat_data->configure_phy=th1520_hdmi_phy_configure; 136plat_data->priv_data= hdmi;
137
138hdmi->dw_hdmi=dw_hdmi_probe(pdev, plat_data); --> 139 if (IS_ERR(hdmi))
140 returnPTR_ERR(hdmi);
Quoted 1 line
s/hdmi/hdmi->dw_hdmi/
Thanks for the report.
A pending fix is at [1].
[1]
https://lore.kernel.org/dri-devel/[email protected]/
Thanks,
Icenowy
Quoted 12 lines
141
142platform_set_drvdata(pdev, hdmi);
143
144 return 0;
145 }This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter