From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-cys01nam02on0090.outbound.protection.outlook.com ([104.47.37.90]:32953 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728496AbeIOGrt (ORCPT ); Sat, 15 Sep 2018 02:47:49 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Alexander Sverdlin , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 4.18 35/92] serial: 8250: of: Correct of_platform_serial_setup() error handling Date: Sat, 15 Sep 2018 01:30:14 +0000 Message-ID: <20180915012944.179481-35-alexander.levin@microsoft.com> References: <20180915012944.179481-1-alexander.levin@microsoft.com> In-Reply-To: <20180915012944.179481-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Alexander Sverdlin [ Upstream commit b29330d829042512fabb2bfa3bbfa32df1115594 ] 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 Signed-off-by: Sasha Levin --- drivers/tty/serial/8250/8250_of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/82= 50_of.c index bfb37f0be22f..863e86b9a424 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_dev= ice *ofdev, dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n", prop); ret =3D -EINVAL; - goto err_dispose; + goto err_unprepare; } } port->flags |=3D UPF_IOREMAP; --=20 2.17.1