From patchwork Mon Jul 19 14:52:59 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: 479919 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4235527jao; Mon, 19 Jul 2021 08:33:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzth6o1z+wkD7ZLMLDTW/bkbsC6g+yBkzXsjZi5KgzeD05IWdJRVkgNby/x2ZqvRdqvo9Cu X-Received: by 2002:a92:6809:: with SMTP id d9mr17555688ilc.107.1626708781386; Mon, 19 Jul 2021 08:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626708781; cv=none; d=google.com; s=arc-20160816; b=g7RPtrZdmgT08+kAy7usU5ljKu0WVSLf1cBz0K+D3dSOAzvoXiYVq0sMX7exbpThaG D9B88IjJVjVCuQqaAkz/e7qHGHjtI5Vcg2cA9vH8w335oCd2yeL0RWiObYVi61/7eRN5 O/SOgY+QefYso1ThCfD/z6GhUkpmQPfhJ3tFxve2UowlDyZXULuRbRuc3dt8/tr7qDF0 3pKfOKfVMJecev1vn70S9MNHvrKC19JBQJTCHSOzE4WftNuO1xqNwzHh1ceu8r4KUmBp f+O7nvflAeT3U9ordaEQwQr9ry1ajIBwQ1sP5x3n8a7RatCpPEG/jzazhf2qlCTsXRgp jtxA== 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=9JU1iqiVGxQiGiMJ80ySqkVWTlNnn60AuNfGHZ9/8n0=; b=HlF7O0eXHO1WCfdZRIPM4FoT6qK1/esKEEDahOWqd4jxvMrJXUMsNAXSLgr2peXoIE 11UJLg5JTSPeRAGk0ijrvWEgeesFORQPbRST861QbX3a3yQVLZ/Uq3dsMeFgTYZuvkuI Z7/GEKA5bg0CVNrgpUMkA/ERqDjOgXucClf0sVKn0odD6TEqnu/EDvx5QYp0g0b2A0na G+2UTScVAsqXApdA3k7f+OwhYVt8OCdqLR6kwOACqVZql59vRG7JOL1bOxDYYOurMigv gWep/6/nIhrJGWACjKd/+rBLD2COi62BXOMxjedb/Hw3AAtozTUHHn2x6HcVszTHp72X h6FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CsgwWr3d; 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 g5si10245056ilk.74.2021.07.19.08.33.01; Mon, 19 Jul 2021 08:33:01 -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=CsgwWr3d; 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 S238261AbhGSOwC (ORCPT + 12 others); Mon, 19 Jul 2021 10:52:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:41930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344181AbhGSOsl (ORCPT ); Mon, 19 Jul 2021 10:48:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4AEB561408; Mon, 19 Jul 2021 15:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626708429; bh=ppW35qgSusQj6wBIpMSCIYMQAiPVAwVu0i48L2F97tA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CsgwWr3d9BXLhen+Ek7Xs5gyRxtvZtBD3ph7RGg2K+sCKYkjQz0FR/TEHo3nLZ6kQ 5iQcGXkN/6t8LFtXPH4BE47XPr7/aDUrPWxeZml9BbEkk5HCXcUPLM5QtqZto/AYzt C2RD/zz7D9Vk61st3/sQJ3HmeUSClAPu3yFP52A0= 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 4.14 290/315] um: fix error return code in slip_open() Date: Mon, 19 Jul 2021 16:52:59 +0200 Message-Id: <20210719144952.982242355@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.861561397@linuxfoundation.org> References: <20210719144942.861561397@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 0d6b66c64a81..76d155631c5d 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;