Received: by 10.223.176.5 with SMTP id f5csp1019022wra; Fri, 2 Feb 2018 09:48:31 -0800 (PST) X-Google-Smtp-Source: AH8x226yLlOmnGQSa/XJ0eR8b3r1Zr8/M6hRxAJP+EcUKYbx/IgyL9CNeMzv+61tj8GExcNK+ynd X-Received: by 10.98.220.6 with SMTP id t6mr2037178pfg.20.1517593711555; Fri, 02 Feb 2018 09:48:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517593711; cv=none; d=google.com; s=arc-20160816; b=VRLbG/rLUfxcfwCZwGl7hLaHpmLiaXjE1nxSNlQvnVUY1I7D0T/4I2VRQFmBZzLRp/ ZcnVu5ESW+hdtCzt4jzWRpkXTBBt08hdk8Hgr+FtK1XAktCToeD5zMC8b6WL7SVLC/Gk 4xHR2a1ni4NDQfKGK5cSytcSLywIDKBeze8Vzm56vfyJSI105ID4ghpglrCdv4ixanTi NvDl3khcejUGckW24aAXJm6K/gu5eTJgBuMehyAHCxOwHjAEc5sOu+Ni2X+Twk+9bzDR YNm0OU0ot8x/7FjptURl7a18KOZj1QF87yUrdzKjShJFPCH2G1eivGH9Ow+vcV2KiaO4 AWng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=E2mQZQb4e+e16/6HPaj8xSmCkvghd0wluj3kJCOba1k=; b=qDsu5h1X14b2tudqleDRgFAyOkNiXpqEbuiomSY+djdl9b6jQOYY6oYTKJr41DGGWe 8+TNczBk5rT9Rdq4EjzJ5Vze3lvaSQYbcdk5zO12/MTW/vd6wQ4+0LpJH1Jo7C+hdFMU PsSpUG68bWb2oykAwBQAiPkwFQwKWpKFhmz/Bc074uaQ8h3FusMens7PSe0kPGrv3J1r gHtT5Eqhl/dfJiUX/R/JcoQ6ItsevkdsQDZa+aYK9NqPzwwGoLW+E7TOflMIIvNPNdqn zNya9FISRvFteDc/HsMdTVt09ycNYz/7XNDjmxBh/7MmH+1g03y6U2yhZo9+yVQkG1Vc fwdg== 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 s2si2180636pfj.279.2018.02.02.09.48.16; Fri, 02 Feb 2018 09:48:31 -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 S1753587AbeBBRrC (ORCPT + 99 others); Fri, 2 Feb 2018 12:47:02 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40340 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753578AbeBBROL (ORCPT ); Fri, 2 Feb 2018 12:14:11 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5468B901; Fri, 2 Feb 2018 17:13:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Philipp Zabel Subject: [PATCH 4.14 147/156] serial: 8250_of: fix return code when probe function fails to get reset Date: Fri, 2 Feb 2018 17:58:48 +0100 Message-Id: <20180202140847.021774034@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: Masahiro Yamada commit b9820a31691b771db37afe2054dd3d3a680c1eed upstream. The error pointer from devm_reset_control_get_optional_shared() is not propagated. One of the most common problem scenarios is it returns -EPROBE_DEFER when the reset controller has not probed yet. In this case, the probe of the reset consumer should be deferred. Fixes: e2860e1f62f2 ("serial: 8250_of: Add reset support") Signed-off-by: Masahiro Yamada Reviewed-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_of.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/tty/serial/8250/8250_of.c +++ b/drivers/tty/serial/8250/8250_of.c @@ -141,8 +141,11 @@ static int of_platform_serial_setup(stru } info->rst = devm_reset_control_get_optional_shared(&ofdev->dev, NULL); - if (IS_ERR(info->rst)) + if (IS_ERR(info->rst)) { + ret = PTR_ERR(info->rst); goto err_dispose; + } + ret = reset_control_deassert(info->rst); if (ret) goto err_dispose;