Skip to content

Commit ef84aee

Browse files
Dan CarpenterLiu Ying
authored andcommitted
drm/bridge: ite-it6263: Prevent error pointer dereference in probe()
If devm_i2c_new_dummy_device() fails then we were supposed to return an error code, but instead the function continues and will crash on the next line. Add the missing return statement. Fixes: 0497236 ("drm/bridge: Add ITE IT6263 LVDS to HDMI converter") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Biju Das <[email protected]> Reviewed-by: Liu Ying <[email protected]> Signed-off-by: Liu Ying <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e4b5ccd commit ef84aee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/bridge/ite-it6263.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,8 @@ static int it6263_probe(struct i2c_client *client)
845845
it->lvds_i2c = devm_i2c_new_dummy_device(dev, client->adapter,
846846
LVDS_INPUT_CTRL_I2C_ADDR);
847847
if (IS_ERR(it->lvds_i2c))
848-
dev_err_probe(it->dev, PTR_ERR(it->lvds_i2c),
849-
"failed to allocate I2C device for LVDS\n");
848+
return dev_err_probe(it->dev, PTR_ERR(it->lvds_i2c),
849+
"failed to allocate I2C device for LVDS\n");
850850

851851
it->lvds_regmap = devm_regmap_init_i2c(it->lvds_i2c,
852852
&it6263_lvds_regmap_config);

0 commit comments

Comments
 (0)