From patchwork Mon Jul 19 14:53:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 479978 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4253780jao; Mon, 19 Jul 2021 08:52:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv1+1VhyMr3rrvjDsGEQzdLtkNTeYgCIe0cbmz8vFazh9bxNKvtedsI9xtbTSZnJtAnvf2 X-Received: by 2002:a17:907:e9e:: with SMTP id ho30mr28336875ejc.114.1626709934616; Mon, 19 Jul 2021 08:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626709934; cv=none; d=google.com; s=arc-20160816; b=tXUv8tsupKCOiO/LSHrsAhfYjlYAAFQjsuy80576i2xjlRWZsslGc7nWfYNQ09Vmm2 OKIvdqvh2U0u2SJFanickU8i1OfzAZrpCv/IT5ecHA/8BC4EBvKxtPHWWCbiJzsfM/rh lWWSUFWFA+z1OOR4nXpkMonUxocDPodumg68+2136El31HJAps1OXdH5qm5z378sqp24 HGpQzLky0ScfcylWglOPOtL9PmS2/mb/e9EQS/4Y0DpC02zLncvir2ltAzR+qxCFBu1u zzI8qlpnyG3bVYHGaV/BoFVvzccgP2q0ESyevu8F5pMyljJ/Zvp6y/rsK6+vubGtYerb /tpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1UEzVc9AoRQpwYmboFp2OBGW0WlLtHjgdpBZbHl4ssk=; b=oOiHGAPiMaVfGDUGO0m82X3muZYi0Yuo9N19UMaEE9K9gqp1nW7FZlXbPaG0ZuEEDA KW6fGC1LI/ZSpxW/h1FVisz5HVbfMBuvDdN2qC+JNZb8btQQQksXfxCCjN0xszwJnN0n IPldx1NSOGduTutseFLyk4y7io08upPmyT3KAvp1lhC2wyIOjw02WMTuw9Nidb6d0MFT 2XJNP8JeXfVSLo9CXmpPTOquCcp8em5s16exONh2RirczhdhDz72ZFAn7xsHsMqubpS2 rLDTO0LAvkcsmFU8iKQ8cCTFac7RxF38+/EVO+ZQadBkGJ/s1dOU/9HcnF7lxx4fvcjd HmUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=znhU6DHi; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si9820360ejs.401.2021.07.19.08.52.14; Mon, 19 Jul 2021 08:52:14 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=znhU6DHi; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345335AbhGSPLc (ORCPT + 12 others); Mon, 19 Jul 2021 11:11:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:39392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345900AbhGSPJp (ORCPT ); Mon, 19 Jul 2021 11:09:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C22486124C; Mon, 19 Jul 2021 15:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626709796; bh=x+P2Do7ryklMpG80dXcyjkEdqfS8QeylccWxHEDQ6Ps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=znhU6DHiClHaSPm1jLoArNb5/gDbdUaGKJRkRFGlWsitaYa1aRBcNQ75yeGQX3iVX gStxsKaQTRqa3/jXof6b+hE3VeFTYAezH73ZdJhZ+ZP6IC7/0lnwpkDNh3B6tA/lwl mypCWk5NY33liSEeQq7Y8OiCycZ72OyKLC+vvSlA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , anton.ivanov@cambridgegreys.com, Richard Weinberger , Sasha Levin Subject: [PATCH 5.4 102/149] um: fix error return code in winch_tramp() Date: Mon, 19 Jul 2021 16:53:30 +0200 Message-Id: <20210719144925.566223294@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144901.370365147@linuxfoundation.org> References: <20210719144901.370365147@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit ccf1236ecac476d9d2704866d9a476c86e387971 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 89df6bfc0405 ("uml: DEBUG_SHIRQ fixes") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-By: anton.ivanov@cambridgegreys.com Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/drivers/chan_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.2 diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index d8845d4aac6a..6040817c036f 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c @@ -256,7 +256,8 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out, goto out_close; } - if (os_set_fd_block(*fd_out, 0)) { + err = os_set_fd_block(*fd_out, 0); + if (err) { printk(UM_KERN_ERR "winch_tramp: failed to set thread_fd " "non-blocking.\n"); goto out_close;