From patchwork Mon Jul 19 14:54:08 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: 480031 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4286080jao; Mon, 19 Jul 2021 09:29:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbq7AlbmceGVqDsnlxvHfhYHQk2PbBGMDnLPl80DlFt4is26LBFlTu2gfbE2W0exjuEOAQ X-Received: by 2002:a05:6402:60c:: with SMTP id n12mr4951143edv.189.1626712158212; Mon, 19 Jul 2021 09:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626712158; cv=none; d=google.com; s=arc-20160816; b=ng45QvsS+ohdnuIhF1tvB72Pc1179NYRE1M3slGNQXBzlbgBNWSBwU3ArePb/J4JQn IG5Cho7ZE+++EgfGUa4QnGthUpkU9BJ6c5ZE7yCSvo2V+a+Z0y03HgyLAU0UGi9rQEOH TiqhSVHZxZxjjwXG8od1WwslJlegDxjhB5Wl28mCfRLj04TWs4WUEGJ28e+RzBwpyROT 8YK0t2Tb27R0ugAkkGMHHP9jGSAHti4soMo8ZuDdkpyFhR6jhpg4E5War0aec7ZKJ7Ud Rv0PfeZvLPqcd36aR675WIDs1lZVdRMNxEnKR4VQhajK/NSuXD+4MDTitFcncyiHffrP 5CPA== 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=uhY3lmcaflk+kbxxHBCNTzVXozJf8DQwkPjmZUFLvIGFAwyFKjay7HBWTN/2TU5Sui 6O6OmiQssSJxfJISZSqcnGsa1lim/ZsKww3kJucbr6sP+lLkIQeZTdSBLKMnDIeLXHqr FCBdQvBnA3eY6LffQtdBNmCJH4MyacC5FVEx9tsEPCNuJgl5Ai1Kc4FqxZH9cWVq2sPO RsTNLdoqR7XS47wjIwcjtIxZcmzVnATnfKx62fxGl5+Hi2dGDXwnoCqYacLXyjtsLUTt m/JxLIQCYgLA7/Pex8OiuWHVfW9uO0zslRgHL3O1YzAMz/HPIBtX9Tei3vu11SnXcjWA he2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tiau51x3; 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.29.18; Mon, 19 Jul 2021 09:29:18 -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=tiau51x3; 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 S235428AbhGSPra (ORCPT + 12 others); Mon, 19 Jul 2021 11:47:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:43682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349559AbhGSPpK (ORCPT ); Mon, 19 Jul 2021 11:45:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9242761408; Mon, 19 Jul 2021 16:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626711936; bh=UxX7E/3Wyq0jhAF9czvnldpvgqX6Mzs0NdJQVvqk8Rg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tiau51x339QMYZ/4bv3s5qwHqfeLvd20HX+8rA9S4Gnjshr3O1bZfl5N0hyUJxlTN 9iJCk0JX4pfbzVvkngjlH01d07uWPnprWEN09JAHX2ZoNpXRpITpWiq8ICk0feGvb/ g3Rm0QJ+w3zGSCg4e3waacmhKPgSn2utNLnYDJ5U= 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.12 186/292] um: fix error return code in slip_open() Date: Mon, 19 Jul 2021 16:54:08 +0200 Message-Id: <20210719144948.606164227@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.514164272@linuxfoundation.org> References: <20210719144942.514164272@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;