From patchwork Mon Jul 19 14:53:06 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: 479992 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4268192jao; Mon, 19 Jul 2021 09:08:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2UuVpO0NQmqxkMR+AmJUIM1j62Mb4NdMCQpzHX+kdPu2tB+vE1p76WdllOerq3M4KiuSo X-Received: by 2002:a17:906:9c84:: with SMTP id fj4mr26799423ejc.180.1626710917496; Mon, 19 Jul 2021 09:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626710917; cv=none; d=google.com; s=arc-20160816; b=xyAuiZj01Iu8KXA4uN48qyi7XIdzbnsGpqqhLvFByyeCpyUOo9c273MBzmkoKC3EVa fIaJ82QXHi/sN+q7szpro2UzN52e3z0Trgr/AKBugKMhh6CqUhsoII5Tgt8EpBMock8m 0l6+s9U48u76EXZ+XpOjiz+TyCZpmdo84fqACZ1+iYPPIWXLUfHzhpj8PAYUfqltznw4 V1K+GWDebtCO5p3sQHnG/+uPT4Q83s7bbBAFSEPSyUMhrzgd7XN4x+dZsgIhj8jEN4hx Em8U+XQ+VkYiDmhPCxSOYOGNKfG6Qcd0DzP83Tfic/SaC8GL52475ZOK5A0qhRRJTs05 AnVQ== 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=1efOlS99/4BGkgJGKY1SRevcDVAK18PXCu3Cr8mVVyY=; b=cjR3Sja1T8Nb3ZWK0mkuIuCijlSw9nvg4ighT/SpTS4UN5wdvaKf7MKbytSl+Hu3J/ 4Mug4EvpXcph0vMiFvN3ZJ4MlaRfzw1Wjy66rq7QvnfX8tCnlpyFjqV1jY6087ClBFLO bEP49e0vZ/TfGprF9T1RtuWXggbbq272jWPtEW0c2Svnu/Ooprb2xaeqgfWUZvQxA9mL iHcQQ3wQcjQBtE4A8QsMdkp+/C/tE9AseM8R0TOOpT1PSYDNtXb8v96ePKPqBqgMYAZu wXe4ksg5y4e7m7BmIRjW9AsnBuw34T5aRWYn6qJEpkeRwE6WpI4GCqqXUzYAttqsC1ze eHJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WeP3bCXr; 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 la14si22045543ejc.142.2021.07.19.09.08.37; Mon, 19 Jul 2021 09:08:37 -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=WeP3bCXr; 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 S1349189AbhGSPZu (ORCPT + 12 others); Mon, 19 Jul 2021 11:25:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:58334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346962AbhGSPSZ (ORCPT ); Mon, 19 Jul 2021 11:18:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6F09A61402; Mon, 19 Jul 2021 15:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710294; bh=UxX7E/3Wyq0jhAF9czvnldpvgqX6Mzs0NdJQVvqk8Rg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WeP3bCXrJOHlfAG1aR8ajTvWFaGCo1Hu9NU0qa/pxMQNNE3JKb8ASbHk8zuOOJBW1 3C41eEs07J0uOHUbsUqBh1KccnPz2KHPahlyPFx4mPRPqZ30QIlnzIL+T6hj/oSfOx UUm7S7bHQYsEUxguBng2doZ/4NytkjXaF9qRXp8g= 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.10 157/243] um: fix error return code in slip_open() Date: Mon, 19 Jul 2021 16:53:06 +0200 Message-Id: <20210719144945.976221221@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@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 b77e81fbe5f5fb4ad9a61ec80f6d1e30b6da093a ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: a3c77c67a443 ("[PATCH] uml: slirp and slip driver cleanups and 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/slip_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.2 diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c index 482a19c5105c..7334019c9e60 100644 --- a/arch/um/drivers/slip_user.c +++ b/arch/um/drivers/slip_user.c @@ -145,7 +145,8 @@ static int slip_open(void *data) } sfd = err; - if (set_up_tty(sfd)) + err = set_up_tty(sfd); + if (err) goto out_close2; pri->slave = sfd;