Received: by 10.223.185.116 with SMTP id b49csp5884014wrg; Wed, 7 Mar 2018 21:00:23 -0800 (PST) X-Google-Smtp-Source: AG47ELv1VvkfO6B9vOHpS0v3q7I2Pq3ABAj9U1fJyID8nk1EeT/sWtD99FyicrVAgYLjLZttW01l X-Received: by 10.98.80.15 with SMTP id e15mr24563050pfb.90.1520485223080; Wed, 07 Mar 2018 21:00:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520485223; cv=none; d=google.com; s=arc-20160816; b=ZWtroDxk1QYX05XSFUSm8q+UajT81QVPCkP7Ar2B0998RJuEqxkQ7TToOBNS49Ra5K SqICt6DX+GqjyxRybk3f01CbpRU1jCtG/VhdugvrjJEIA5Kky/MDbT3R/s8hVw55FRkH PXk53bHXyw3cxR21tDDV4n3LZm/gQYxC/0D7ZpxZmQsKO9EB8lTKN7B5cCEhzjYyQ1wi y12LJ4LZ0B0Jwq+Mt2vnHVwPuE+69Zjmjo0aS2A0cBv7DGAM83hcU6FaDAyYRa8IQrtk f0DpKhON85x2gJmBEvWS6TIXN6kJlHwu1SmGXErIP43oQ6oF+9qaJM33sh0/l8kgyOFl ApIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=MUiaebATege8eipSPXsvVVIMVh7kY0YMnGpu8n9ZymA=; b=msSwyLdZNOXR6c51Gs4oj2UJR21DvpkxGYEFcYrfTSwCmmEuI+w0N3tHkGICDcGpYD O0ndvgluYENgSMLThoSwdhPNRDmmMTAAtlu2DLl2Z/E+b4VgvKYFewxV4ZiKk5pqIEre 6EjygdJ2D3aVsaajslKCfFrTy8+HR6NaA2rghpzh+A6iK3jrelBSgKNPvwoC8g9VtVF/ PJSmBFBK/GvpBwaYEJ4ol4d9eVOmnWcck2iORD+7ls8vAv59Yi7AkHot7c1/EbgQACga 5P7f3GEQbYq4sgotA/sU6GaQan1onirC9CH4Ay3eab5LPmrEE04CKdXwsflHR2Ilg2hE ZxSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=CVSCC3ow; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3-v6si14118842pld.545.2018.03.07.21.00.08; Wed, 07 Mar 2018 21:00:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=CVSCC3ow; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965217AbeCHE6l (ORCPT + 99 others); Wed, 7 Mar 2018 23:58:41 -0500 Received: from mail-by2nam03on0101.outbound.protection.outlook.com ([104.47.42.101]:17968 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935243AbeCHE6V (ORCPT ); Wed, 7 Mar 2018 23:58:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=MUiaebATege8eipSPXsvVVIMVh7kY0YMnGpu8n9ZymA=; b=CVSCC3oww2AX5e0HSQoMn0SfKT3V35xjNQzWxj6aBiDfSep18n0kzClUePI6duKNW1Z0m9uUApuHCZeGNSp+tmMP0wpDgQIvymc2VLnQX1e7gvzCdeL7ctYuE76Z7sWYACUF2PLaT4N3Al/9X1f9z0VtrEVSgn0Ov0gaof09HJI= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0808.namprd21.prod.outlook.com (10.167.110.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.1; Thu, 8 Mar 2018 04:58:14 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:58:13 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Stefan Potyra , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 21/67] serial: 8250_dw: Disable clock on error Thread-Topic: [PATCH AUTOSEL for 4.14 21/67] serial: 8250_dw: Disable clock on error Thread-Index: AQHTtpn8C7vB6TVAmEmOABGyfCHCpg== Date: Thu, 8 Mar 2018 04:57:40 +0000 Message-ID: <20180308045641.7814-21-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0808;7:VrPY3nAHGB4EOgzLQ/GZRApvEN0QvL0IHGEMAwASNkqSp82eHdrvP9zHwGR2/3p7miqbWedxrdMU6wAfXTEV3+2wn8ngcGTT69rBNeEz3spc++MdMo43dMZ+dF5QpROAQresjNDY95z9B5N/zi5OLbXfwP+8gcw9A32nnnPtkNk5SmdNdyiIyCOGGqNpZlHN4fGe+xJp+4WiYb2ednYY8Q99CID7JZBWL5GCDNV777eqDVOxbabXF7l5ToCXrT1U;20:cpNCalIP07mjyWW585R3/oF9eSY5SLgBaTnYBmktMVkMDR/dl9oo8Ecqsrz1fbSDZZYxLlWrIOrOO2hKqLLYVKX3vAovD/gdOW4SbR007iacbDuBWCsQUlGP80pGEfUowlvxPK3ytWrr0hZX9PkhzC0xuGxB2AaNzyqxICcZhe8= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1946e41f-a0a3-4fe4-39e2-08d584b132d3 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0808; x-ms-traffictypediagnostic: DM5PR2101MB0808: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0808;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0808; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(396003)(39860400002)(366004)(376002)(346002)(199004)(189003)(22452003)(99286004)(76176011)(2906002)(105586002)(3846002)(86612001)(478600001)(72206003)(14454004)(2900100001)(8676002)(102836004)(68736007)(5660300001)(316002)(6116002)(54906003)(26005)(6506007)(59450400001)(1076002)(86362001)(36756003)(186003)(10090500001)(110136005)(106356001)(4326008)(6512007)(6486002)(7736002)(5250100002)(3280700002)(3660700001)(2501003)(6666003)(81166006)(2950100002)(305945005)(53936002)(107886003)(8936002)(6436002)(81156014)(66066001)(25786009)(10290500003)(97736004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0808;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: OYWeZr4PPFongr1VmGbqdAExn0Jb85X/hwOoOQFcvJZG+YTIAeOQJ0n4SnpAta/Yw4ATMvEPq58LOjvrlumFr+Q3A9e4Dq/m7dMgFIL+OHPQonrcEvjN3xv7GGHH7sNC1F4UzmlL0bjPNuAWsT66TDXmFHXwXcpNPobdXt8aP/s2I/e3mRRka2Ae/Zr2D77ZbEjQmKhNsTo1/hWpei1wQiiIQ5XjcrT3E69aD2Gvuip+HRpt6qtbcuOm63iFaAiqWeHeceAuXdYHguNNviJke+Ol+XrrA9qmQC0i9CxfPJp6ZdOdR11uczx7G6bA6aKs79I+j8kgR//pXN6Oo7RxSw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1946e41f-a0a3-4fe4-39e2-08d584b132d3 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:40.6542 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0808 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Potyra [ Upstream commit 8af016aa5a27c6a2505460eb4d83f1e70c38dc43 ] If there is no clock rate for uartclk defined, disable the previously enabled clock again. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 23f5b3fdd04e serial: 8250_dw: only get the clock rate in one place Signed-off-by: Stefan Potyra Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/8250/8250_dw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/82= 50_dw.c index 7e638997bfc2..3015789265dd 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -513,7 +513,8 @@ static int dw8250_probe(struct platform_device *pdev) /* If no clock rate is defined, fail. */ if (!p->uartclk) { dev_err(dev, "clock rate not defined\n"); - return -EINVAL; + err =3D -EINVAL; + goto err_clk; } =20 data->pclk =3D devm_clk_get(dev, "apb_pclk"); --=20 2.14.1