Received: by 10.223.176.5 with SMTP id f5csp995570wra; Fri, 2 Feb 2018 09:25:27 -0800 (PST) X-Google-Smtp-Source: AH8x224Fym4RScUuveUSajrIlTHJ3usSRH0T6BqzcBBCww4DZQNGmy4PobYJwa09JfpysB0lgbTc X-Received: by 2002:a17:902:bc47:: with SMTP id t7-v6mr5163039plz.200.1517592327220; Fri, 02 Feb 2018 09:25:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592327; cv=none; d=google.com; s=arc-20160816; b=RqHqCpBI1xMe0hFwFSZ9JR3+mA7jsdC2tF3gjcX85ejZ5e45xQnfzTXjBs5b//zU39 yFEKhpcV6EIZD7c1asw+npixMSdIR0vS/YesRdY6vHA4+mVzdOQZKuOv//U9WhOCBAyd VxPMt6ZT02tYntUKhaIF9Azv/Hu8yQpztznskD3uESWO1ysmVyywJhv/ez350xEfve0z yig9l22808Be/sdkhinYnaZHBlHm3jgp5EdPCww+VK6oYPlzwUqGUSJJTkhF8S8UzxCu L9ARSSD+MqwNF8AZbq2peM7FvqcvPQU0Jaz1TM6+ryR+woI9sqGoBcm6DugMka6R0P93 GRnQ== 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=m8YzTU0b6I/Q9SLgB1KK+QVv3wFUfAjm7u9q6FdRk4g=; b=RdkNjE6UaAjRjmUP9Y22x3Z5iwxHHcJo4udF0Bn+ff6o0f4AOF0NH7wNvB9jhK74qD g5hUSpt0TLo7DeJaXS0AsWbWiaXWMPStp4O6QGehcqn3cir/hsvrUMtbnVq+0NJ/yaWE FwM2DBWSt6gcOUlEyntdYBPWqxwsDuFQVgZWcSVqmSvIjEYt6cweWnEXDiWxrpJEJzre XpWbL2I01ub2r6DrBnjrTCxbmG05zBgpWF51GFeYGad3ofTZrdiy1e0nDEN5fv2r45Y7 ttsHUYZerNI9U7HjpEkaRpSLkBHpgFUoDCEnRyfg5CXKKigRDZwHIREQsFgmHnJ4tudn UfJw== 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 b5-v6si2133996pls.587.2018.02.02.09.25.12; Fri, 02 Feb 2018 09:25:27 -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 S1753538AbeBBRX5 (ORCPT + 99 others); Fri, 2 Feb 2018 12:23:57 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40362 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753394AbeBBROM (ORCPT ); Fri, 2 Feb 2018 12:14:12 -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 2198AAD8; Fri, 2 Feb 2018 17:13:52 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , Masahiro Yamada Subject: [PATCH 4.14 148/156] serial: 8250_uniphier: fix error return code in uniphier_uart_probe() Date: Fri, 2 Feb 2018 17:58:49 +0100 Message-Id: <20180202140847.061624606@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: Wei Yongjun commit 7defa77d2baca4d6eb85234f10f38ab618332e75 upstream. Fix to return a negative error code from the port register error handling case instead of 0, as done elsewhere in this function. Fixes: 39be40ce066d ("serial: 8250_uniphier: fix serial port index in private data") Signed-off-by: Wei Yongjun Acked-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_uniphier.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/tty/serial/8250/8250_uniphier.c +++ b/drivers/tty/serial/8250/8250_uniphier.c @@ -259,12 +259,13 @@ static int uniphier_uart_probe(struct pl up.dl_read = uniphier_serial_dl_read; up.dl_write = uniphier_serial_dl_write; - priv->line = serial8250_register_8250_port(&up); - if (priv->line < 0) { + ret = serial8250_register_8250_port(&up); + if (ret < 0) { dev_err(dev, "failed to register 8250 port\n"); clk_disable_unprepare(priv->clk); return ret; } + priv->line = ret; platform_set_drvdata(pdev, priv);