Skip to content

Commit ca8dc59

Browse files
Dan Carpenterhverkuil
authored andcommitted
media: synopsys: hdmirx: Fix signedness bug in hdmirx_parse_dt()
The num_clks is set this way: hdmirx_dev->num_clks = devm_clk_bulk_get_all(dev, &hdmirx_dev->clks); if (hdmirx_dev->num_clks < 1) return -ENODEV; The devm_clk_bulk_get_all() function returns negative error codes so the hdmirx_dev->num_cks variable needs to be signed for the error handling to work. Fixes: 7b59b13 ("media: platform: synopsys: Add support for HDMI input driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
1 parent fae8cab commit ca8dc59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ struct snps_hdmirx_dev {
151151
bool hpd_trigger_level_high;
152152
bool tmds_clk_ratio;
153153
bool plugged;
154-
u32 num_clks;
154+
int num_clks;
155155
u32 edid_blocks_written;
156156
u32 cur_fmt_fourcc;
157157
u32 color_depth;

0 commit comments

Comments
 (0)