From: Alexander Sverdlin Date: Fri, 13 Jul 2018 14:58:54 +0000 (+0200) Subject: serial: 8250: of: Correct of_platform_serial_setup() error handling X-Git-Tag: v4.19~372^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b29330d829042512fabb2bfa3bbfa32df1115594;p=platform%2Fkernel%2Flinux-rpi.git serial: 8250: of: Correct of_platform_serial_setup() error handling Don't dispose IRQ mapping before it has been created. Fixes: aa9594740 ("serial: 8250_of: Add IO space support") Signed-off-by: Alexander Sverdlin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c index bfb37f0..863e86b 100644 --- a/drivers/tty/serial/8250/8250_of.c +++ b/drivers/tty/serial/8250/8250_of.c @@ -124,7 +124,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev, dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n", prop); ret = -EINVAL; - goto err_dispose; + goto err_unprepare; } } port->flags |= UPF_IOREMAP;