From patchwork Mon Jul 19 14:52:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 479884 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4220909jao; Mon, 19 Jul 2021 08:16:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzPY7MXJIHAYb5uf49+IUhPGARaU51HeveyF5A41V5ZmiKp7tY2QDIaaMUUb0MTqNAgfYO X-Received: by 2002:a02:a80f:: with SMTP id f15mr22363503jaj.142.1626707762894; Mon, 19 Jul 2021 08:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626707762; cv=none; d=google.com; s=arc-20160816; b=NhOveyte4EEITPuWSYr+8hlsFq9dUg6UpoF2+QuJCn0sEoIYe/UIXkAamx/s0qlmIk YG24btMYJcp3daQIbrSlGn1SAOUMI6lFdsiPW2lteLy1YkQU1SvC35W/m/HzhEd2hesW lfD9zRJzysIRH8E/yp5n/Yc9Xv7ZeuX+dHm2ENwOvGB/pVeMgDs3Zw/9Thuhl2MwEJol MNk8K48RFDvE/EtFIPB65Li/ZmI/WysjP0RrjQFG07A+nMp2MK4+t39tEiBh9qNrd4O6 SAmS8bDSArvv1Eez80Da/e/15ppoNw6G9CQLpZSjIkiggbohobwKn9NPNwQGgRFlPVgo 1hnw== 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=xxeximcjWTqZD0SdfBpFJcsWSehQtITr32Ht14s89Lr43HvfwgsNEUGSdNL67VmvCY 2/ejX/CHf/jaIgISP5n0P6mUun621AI2JbUwhEqnCW4NKcSD95aq3B9UEDazktTzyWOl t2Krz4cKHCYvLiJ4SC88/at81snzuRfe3OT8jG12VMiigvkiDTMi0x4O3p+mAaNvNhGF /p/p5A+O+yGXlyYLPkQiz05mhVMv26WZzQvEvOhXaCfD35XQsTqKRWNkyo8mHbJ6k85o q0GCFGPc9F6+ZULQQZl71+CUmhlMEicOd52rBVu/2rXBLHsNOCH9pSWfWZ8rJeQYHklh 35dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Q4gPP9xy; 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 t26si1805381ioj.103.2021.07.19.08.16.02; Mon, 19 Jul 2021 08:16:02 -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=Q4gPP9xy; 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 S243483AbhGSOfT (ORCPT + 12 others); Mon, 19 Jul 2021 10:35:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:46606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244287AbhGSOdI (ORCPT ); Mon, 19 Jul 2021 10:33:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26C6C61241; Mon, 19 Jul 2021 15:13:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626707592; bh=ppW35qgSusQj6wBIpMSCIYMQAiPVAwVu0i48L2F97tA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q4gPP9xyTAhkQstwmF+krC59hMeVJQsIUtq3jSE5VyfEQiGo8m38syROocncs+LmG z2Lz/8fSrzfFI+aph7KSM2/ZhfM33irBrbHiGTuqEg6w7fi/881iXhnWvdOLax/lLl kU6GnDNUyyxk0R7SUCk8SuNFmBz55e/1eKceieYY= 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.9 226/245] um: fix error return code in slip_open() Date: Mon, 19 Jul 2021 16:52:48 +0200 Message-Id: <20210719144947.694737295@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.288257948@linuxfoundation.org> References: <20210719144940.288257948@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;