]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/bridge/tc358775: Return before displaying inappropriate error message
authorJiri Vanek <jirivanek1@gmail.com>
Wed, 15 Jun 2022 22:22:20 +0000 (00:22 +0200)
committerRobert Foss <robert.foss@linaro.org>
Mon, 20 Jun 2022 19:34:20 +0000 (21:34 +0200)
Function for reading from i2c device register displays error message even
if reading ends correctly. Add return to avoid falling through into
the fail label.

Signed-off-by: Jiri Vanek <jirivanek1@gmail.com>
Reviewed-by: Vinay Simha BN <simhavcs@gmail.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220615222221.1501-2-jirivanek1@gmail.com
drivers/gpu/drm/bridge/tc358775.c

index e5d00a6e7880bb26b1ffe648bdbd00f0e2ff7147..8909b820db0d4b3b92dab8da386bb4a2960016e7 100644 (file)
@@ -339,6 +339,7 @@ static void d2l_read(struct i2c_client *i2c, u16 addr, u32 *val)
                goto fail;
 
        pr_debug("d2l: I2C : addr:%04x value:%08x\n", addr, *val);
+       return;
 
 fail:
        dev_err(&i2c->dev, "Error %d reading from subaddress 0x%x\n",