Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2530608imu; Thu, 29 Nov 2018 06:28:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/UyNDb7dlpLqLnDHYj8Zn1jXXKa1DoNMw+tSfrBUqKU0AoWK+PyYPg3TqfvC88JIXmjiD/L X-Received: by 2002:a17:902:b68d:: with SMTP id c13mr1707899pls.102.1543501734060; Thu, 29 Nov 2018 06:28:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543501734; cv=none; d=google.com; s=arc-20160816; b=fy0MiYLv1RmSBbO+3x4LKytwfKw2K3zHylyzuAzJB9IG3hwru3/ENRkcdRXpqKYcyR c8hGnzm9pLzj5xM3ar4k0uJvW1W5cYTcZHJRq0u6ze9yjd/iO5Nc8NPV2Yg1EdcEpOeA SuDlF2X19X2ezmGplNxhS21b9Eu4pHfEF6m5I9wbT56/IRFBRTrgqUqB3aPyaDDS0f2J CcAoxOcbBGi4FgZaqGp3AwOmbZ4HcgjzQgJ+STbUty6R9XaNMJq9Fz9gakLJ8WMLeGA2 ia5yF56Xi8gQ7YF9jIepk7Wa6XKyJ+4aOBe+00pIzarhn15X/2QaGxJCktABbSFmnmO4 uOrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=27ATG6DsWFrafz+knTyf4on742n06gCdzGrOQi+PBXA=; b=SPVkKVBxue9sx00kQRjbb5i0PlZHpz5Ffb8cdZ7kIFkc6IHUVg66BQb4hh/PPqZzIJ 4JorpPOPoSFQnpG8gqwwBnCYpPFNSgk4uagF5KM+D98/DfJcffymP60qWP+k+GlTZOVR NA4EWVaV1uCm/HjoAP2y3OPp63ssME0iVStOi6+hM+WsDiVktuF+teVRRyfKYj/tubsF VzxpjL0b9+1Peise9b/CDA8ZtPFlWsSgKGtzzIz1E3EKZRrxdBwVsOjqCn4bO30pATpD UEsOd1Z5D0tJrFIT5UiIr7JJmPS9maUH3hrQ7wQnu2C4ncHMn/Dqbc673SNmX3vmPlw+ krfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q9l+nbXW; 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 d23si2022790pgj.558.2018.11.29.06.28.39; Thu, 29 Nov 2018 06:28:54 -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=@kernel.org header.s=default header.b=q9l+nbXW; 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 S2387831AbeK3BdT (ORCPT + 99 others); Thu, 29 Nov 2018 20:33:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:33862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387804AbeK3BdS (ORCPT ); Thu, 29 Nov 2018 20:33:18 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 215532133F; Thu, 29 Nov 2018 14:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501666; bh=iSzZvdE4uB0giy3azf9ynZGXjuGr0TifaNN88t5gp3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q9l+nbXW6WEevW6JSB9d2rEkk1pT27RZrbws0f9VQXy8NVEjHdFZw6kAMi1YsmEvk E9hPL+tO4l7LBQ/+COEQgdrQtCWItIpNuOmexYFG9wjescb0F/JwQqx6B/w69Mcx6A c0BnMCtjXm///uxKqaeubnNnFnRd+uRCrNLx4T9M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexandre Belloni , Sudip Mukherjee Subject: [PATCH 4.14 084/100] rtc: omap: fix error path when pinctrl_register fails Date: Thu, 29 Nov 2018 15:12:54 +0100 Message-Id: <20181129140106.039538463@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexandre Belloni commit 26e480f7bb7840fc0daa9c3af7c4501b2cf5902f upstream. If pinctrl_register() fails probe will return with an error without locking the RTC and disabling pm_runtime. Set ret and jump to err instead. Fixes: 97ea1906b3c2 ("rtc: omap: Support ext_wakeup configuration") Signed-off-by: Alexandre Belloni Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/rtc/rtc-omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -823,7 +823,8 @@ static int omap_rtc_probe(struct platfor rtc->pctldev = pinctrl_register(&rtc_pinctrl_desc, &pdev->dev, rtc); if (IS_ERR(rtc->pctldev)) { dev_err(&pdev->dev, "Couldn't register pinctrl driver\n"); - return PTR_ERR(rtc->pctldev); + ret = PTR_ERR(rtc->pctldev); + goto err; } if (rtc->is_pmic_controller) {