]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
serial: 8250: omap: Cleanup on error in request_irq
authorMarkus Schneider-Pargmann <msp@baylibre.com>
Wed, 7 Aug 2024 14:12:25 +0000 (16:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 06:22:49 +0000 (08:22 +0200)
If devm_request_irq fails, the code does not cleanup many things that
were setup before. Instead of directly returning ret we should jump to
err.

Fixes: fef4f600319e ("serial: 8250: omap: Fix life cycle issues for interrupt handlers")
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20240807141227.1093006-4-msp@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c

index 02d4f3073696d4a5b3d1b11777d13ca52f476d40..01d430de9c64585f8e67687c53149f08c9c12457 100644 (file)
@@ -1587,7 +1587,7 @@ static int omap8250_probe(struct platform_device *pdev)
        ret = devm_request_irq(&pdev->dev, up.port.irq, omap8250_irq, 0,
                               dev_name(&pdev->dev), priv);
        if (ret < 0)
-               return ret;
+               goto err;
 
        priv->wakeirq = irq_of_parse_and_map(np, 1);