media: c8sectpfe: fix probe device leaks
Subsystems (2)
PATCH 1/1 media: c8sectpfe: fix probe device leaks
Make sure to drop the references taken to the I2C adapters during probe on probe failure (e.g. probe deferral) and on driver unbind.
--- .../media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c +12 -0
@@ -655,6 +655,13 @@ static irqreturn_t c8sectpfe_error_irq_handler(int irq, void *priv)return IRQ_HANDLED ; } +static void c8sectpfe_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int c8sectpfe_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -799,6 +806,11 @@ static int c8sectpfe_probe(struct platform_device *pdev)return -ENODEV ; } + ret =devm_add_action_or_reset (dev, c8sectpfe_put_device, + &tsin->i2c_adapter->dev); +if (ret) +return ret; +/* Acquire reset GPIO and activate it */ tsin->rst_gpio = devm_fwnode_gpiod_get(dev, of_fwnode_handle(child),
Signature · 1 line
2.49.1
Quoted 8 lines · Johan Hovold
Make sure to drop the references taken to the I2C adapters during probe on probe failure (e.g. probe deferral) and on driver unbind.
Fixes c5f5d0f99794 ("[media] c8sectpfe: STiH407/10 Linux DVB demux support")Cc [email protected] # 4.3Cc Peter Griffin <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Can this one be picked up for 6.19?
Johan
Quoted 10 lines · Johan Hovold
Quoted 8 lines · Johan Hovold
Make sure to drop the references taken to the I2C adapters during probe on probe failure (e.g. probe deferral) and on driver unbind.
Fixes c5f5d0f99794 ("[media] c8sectpfe: STiH407/10 Linux DVB demux support")Cc [email protected] # 4.3Cc Peter Griffin <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Quoted 3 lines
Can this one be picked up for 6.19?
Johan
Hi Johan
The removal of c8sectpfe driver has been initiated see https://lore.kernel.org/linux-media/[email protected]/
Regards
Patrice
Hi folks,
Quoted 14 lines · Patrice CHOTARD
Quoted 10 lines · Johan Hovold
Quoted 8 lines · Johan Hovold
Make sure to drop the references taken to the I2C adapters during probe on probe failure (e.g. probe deferral) and on driver unbind.
Fixes c5f5d0f99794 ("[media] c8sectpfe: STiH407/10 Linux DVB demux support")Cc [email protected] # 4.3Cc Peter Griffin <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Quoted 8 lines
Quoted 3 lines
Can this one be picked up for 6.19?
Johan
Hi Johan
The removal of c8sectpfe driver has been initiated see https://lore.kernel.org/linux-media/[email protected]/
Interesting, I hadn't seen that. I guess I should dispose of my b2120 board then!
Peter.
Quoted 11 lines · Patrice CHOTARD
Quoted 10 lines · Johan Hovold
Quoted 8 lines · Johan Hovold
Make sure to drop the references taken to the I2C adapters during probe on probe failure (e.g. probe deferral) and on driver unbind.
Fixes c5f5d0f99794 ("[media] c8sectpfe: STiH407/10 Linux DVB demux support")Cc [email protected] # 4.3Cc Peter Griffin <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Quoted 3 lines
Quoted 1 line
Can this one be picked up for 6.19?
The removal of c8sectpfe driver has been initiated see https://lore.kernel.org/linux-media/[email protected]/
Ah, ok, thanks.
Johan