On Wed Jul 15 09:08:22 2026 +0530, Biren Pandya wrote:
> The remove function and the probe error path are missing calls to
> media_entity_cleanup(). Add them.
> 
> Signed-off-by: Biren Pandya <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 drivers/media/i2c/msp3400-driver.c | 3 +++
 1 file changed, 3 insertions(+)

---

diff --git a/drivers/media/i2c/msp3400-driver.c 
b/drivers/media/i2c/msp3400-driver.c
index 413cfbc2dd94..a540b211f7d7 100644
--- a/drivers/media/i2c/msp3400-driver.c
+++ b/drivers/media/i2c/msp3400-driver.c
@@ -717,6 +717,7 @@ static int msp_probe(struct i2c_client *client)
        if (state->rev1 == -1 || (state->rev1 == 0 && state->rev2 == 0)) {
                dev_dbg_lvl(&client->dev, 1, msp_debug,
                                "not an msp3400 (cannot read chip version)\n");
+               media_entity_cleanup(&sd->entity);
                return -ENODEV;
        }
 
@@ -812,6 +813,7 @@ static int msp_probe(struct i2c_client *client)
                int err = hdl->error;
 
                v4l2_ctrl_handler_free(hdl);
+               media_entity_cleanup(&sd->entity);
                return err;
        }
 
@@ -865,6 +867,7 @@ static void msp_remove(struct i2c_client *client)
        msp_reset(client);
 
        v4l2_ctrl_handler_free(&state->hdl);
+       media_entity_cleanup(&state->sd.entity);
 }
 
 /* ----------------------------------------------------------------------- */
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to