From patchwork Mon Jul 19 14:52:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 479859 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4211913jao; Mon, 19 Jul 2021 08:06:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHkOS5ULv6NfN4NweC473WZ0+v9zeDcXUO3rAp/iQOk1fVIjObtGMISZIjTfcWpUeRn+Lt X-Received: by 2002:a92:c143:: with SMTP id b3mr16670471ilh.145.1626707177604; Mon, 19 Jul 2021 08:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626707177; cv=none; d=google.com; s=arc-20160816; b=zpzn3mcMRkqOeCbx//ZQoYJzaPgxje2xTAKMrQviERiehJl3lCH6IkNYW6EARea165 7xbmgKfI3IGzz2OoFhF/UQ34YArlEuz5ndo0TPaA14nDpclAyFbfzVxK4no3csppc/xK VPtHsAoPxibtyVoMw4CNX2pxrOKMqTFuzzXXychNQFTZl0Zm+eTzv3xZXx9I8G32dMnw NQ61GTeVe01rXqKO13qgakvWLb3jIs43BwJSLkR4AHgNdp51Az+qHyP8WawaWBcHbK+N gGYX664/wzG+D5JpD+6JZ/KkyJ5fqTTZWcoTqkGuQwmUT+nByoWVjvK3yqlIeh2IH4jb LOxA== 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=tbK8PPDdZCv1FfliXH8/mkFVj+rxd+JUfzq0JYs4Xr93IgCCKX+Fdo3h+bbeDWlpf7 YK6frdmXMDmdqRmF6x3N9hsmiRnPw6tCG+z0HcazZ8D9/r7+I4YPJi+GjF771ujZctVa 20BXfCTXSrWN0MN8PcKCLcxSrwf2QcUt7gnHM9NAHVae7wHrq+W0mm3+4zzNbxzK/6Nt V4MxhLq234Aqbt5ihAd0L4xgoIppjlXidk3/PN2u514jYJjbM4ZehZP8majb32U5eWHa 1eZ6u/MMevTHV/sWZX0COx7UzHtrYspeWijvJd+zM5/7VA3PXgFZGZU4FBmJhnPcQUtq dnKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1fqyab8/"; 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 i9si21653919ioq.17.2021.07.19.08.06.17; Mon, 19 Jul 2021 08:06:17 -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="1fqyab8/"; 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 S243205AbhGSOZe (ORCPT + 12 others); Mon, 19 Jul 2021 10:25:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:55504 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243359AbhGSOXi (ORCPT ); Mon, 19 Jul 2021 10:23:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D359C611ED; Mon, 19 Jul 2021 15:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626706992; bh=ppW35qgSusQj6wBIpMSCIYMQAiPVAwVu0i48L2F97tA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1fqyab8/ERpgQKAfEuTtdJCLIrgHtoTNaL8TAJlGrhWKRCLxkfDTVIp5gq0JR6WC8 sHhq1Y5xoG50LVlCY0kS+1PMlO3a+YCmnEMIaf6YOYUOw3/rT36lbMqBcAc4ik986R ceLoYffOrnZblwQ6eBeqwSKEush4UuMIM1w68k4Y= 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.4 177/188] um: fix error return code in slip_open() Date: Mon, 19 Jul 2021 16:52:41 +0200 Message-Id: <20210719144942.278748365@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144913.076563739@linuxfoundation.org> References: <20210719144913.076563739@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;