Received: by 10.223.185.116 with SMTP id b49csp6356735wrg; Wed, 28 Feb 2018 08:06:18 -0800 (PST) X-Google-Smtp-Source: AH8x226Byhh4/lqTAb+Aq1q4GUJD/PjD5+DoY6zmkb3WG4+3NjixtEbIml0uw8XdkZTH4zSf3cun X-Received: by 2002:a17:902:a70f:: with SMTP id w15-v6mr17980774plq.79.1519833977973; Wed, 28 Feb 2018 08:06:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519833977; cv=none; d=google.com; s=arc-20160816; b=Qd3F2yYpUMQwDuo4X6u3FPbmZ5PvFzSH4EL66S9fEPmNYsd7Z02UiJ9/ZAHazWgYw8 bOHo5O8/l0iJ1Zu4qzK98ImQHfuFEbdYWKAZgZU83JfQO6vSGefIiDb8wNjj5YzwqKtF mGLJFtUXKw6SkIW3y0Wd7y6IB2HE0IFIfsXHAPUWrvJshaqzKTlY3mbqo46U93/2cqhe li0K6eEVL9/l9vzvWHuvfYJpB5h1vPWknAxiXPhsffsLq0T37QKwWTxxJl2SJb5Lhemw VHrM0wyemAIkgAL1Ug9MeZsS/FiJZvEW0W2HsNWLF/zOFyU5mzYHrmcUk479x7t9p8GT rT2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=JNtrIQmlBh8k/rLGZRwKR7twjrWJji3qSBBxqWOhpkE=; b=utunnOhegQuc8XtK/vg0yWXQEJe0AxbmKOMO92SygMc++4VJJr8K1Aps9qeDvWIBKG tqZljYODTajT8DhnZtr6qm+I4JlQoUVDsSG13HutDtC6WaR/5g5MX0wkBDthJNq1LiBB gbW6yCWVLi1LSa1Fqw+dxdAAp/KYEvyn1db1No6GHfI/RRbNjxuoF7R/uosXwlBMCFYq MGSW+xZFqAblUL5ORESluwyb/2jRPUZbL3pBUtt3s7WXNf1MAzg2sTNt2trJVUW1Sgqg JdgZe7JCLkcwHP1a7Wop9z5X4ibkPrqgV/fTxLU/zGeFYP0NO2vm6dxXM79v+4SjSGgY oWRg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y86si1395454pfi.19.2018.02.28.08.06.03; Wed, 28 Feb 2018 08:06:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934440AbeB1QEu (ORCPT + 99 others); Wed, 28 Feb 2018 11:04:50 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34846 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932702AbeB1QEs (ORCPT ); Wed, 28 Feb 2018 11:04:48 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yg-0006XQ-PN; Wed, 28 Feb 2018 15:22:19 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yf-0008SW-0f; Wed, 28 Feb 2018 15:22:17 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Andrew Lunn" , "David S. Miller" , "Tobias Jordan" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 066/254] net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Jordan commit 589bf32f09852041fbd3b7ce1a9e703f95c230ba upstream. add appropriate calls to clk_disable_unprepare() by jumping to out_mdio in case orion_mdio_probe() returns -EPROBE_DEFER. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3d604da1e954 ("net: mvmdio: get and enable optional clock") Signed-off-by: Tobias Jordan Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- drivers/net/ethernet/marvell/mvmdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -241,7 +241,8 @@ static int orion_mdio_probe(struct platf dev->regs + MVMDIO_ERR_INT_MASK); } else if (dev->err_interrupt == -EPROBE_DEFER) { - return -EPROBE_DEFER; + ret = -EPROBE_DEFER; + goto out_mdio; } mutex_init(&dev->lock);