From patchwork Mon Jul 19 14:53:29 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: 479981 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4254714jao; Mon, 19 Jul 2021 08:53:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxhtRHvSUnwE0ByzIHSOS1yhLq8P7OchAQm8SLAgOpx7g5kPLrwTGwbY+VCqTdFMVG3UYJ X-Received: by 2002:a17:906:31cb:: with SMTP id f11mr28482788ejf.379.1626710005703; Mon, 19 Jul 2021 08:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626710005; cv=none; d=google.com; s=arc-20160816; b=JWigoxV3mJwX5fyT9XILeulQKJ0JuTfrjMrlt64LuqA5w1cLdiMyswC1QMyUAAie9v xEmbweMxQD5+/CbLLpDI13jBR/uA58JduyPcQlBEZAGCnNMYoyFNDp/GEUon9oKPtvxT n3Lnf2bVM631zcskdA7NcFxo5ykJCJDQfIGVRZZBBzOhTSkaEpBan9LNRv3B0KUs4+1k ybp1D6UNE342jBMTYSFeQcXH0c5rQK5wMVjLlTUyMy1eFyDMZDIs2PF3JPhd5a4R6kAc /9pJhu9OiyKmvH1hTE6iPKmjbIBCfW8WwoJfKo+lmVKRzzg8+HfUiTj3DHwUlJmK88l9 CCTg== 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=pJ621yg2HgSV75FGn9GbSx+bTaNsqVlRlAbAFFU9AGs=; b=dbDMyGeaKzt9NH2tlQYEiY3aNgLVZT2GP6If6S0HjvhA4seXXFHhLAqu9FgkLRr6r9 +eVviXDqi8LDdn6kWc4Z6Ldi6NfrxPdCLe9Y3ZpACkV2ARd9ap2Lxij86Ianw9ldcRl6 USokm9JYLoFvmmLE1HhDbBtQAUNTYTAvosvTq4BBl/daOxeuBBs2zPbdJEejyKzUdTjP e1GJPzV9xyyRGQEccXMh07m7b1MQ1IyoMrXZLaqgDaj/+TPixorGoO91XlmCE/0gXOJw YZHwYx5y3gg+T+bxki2vlRg8owqIgUHYMjD9EJy+2oiVeYVR7ekUNfbBEahTxBmQSqtX 7YFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vui9b9y+; 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 z16si26773967edm.47.2021.07.19.08.53.22; Mon, 19 Jul 2021 08:53:25 -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=Vui9b9y+; 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 S1345716AbhGSPMi (ORCPT + 12 others); Mon, 19 Jul 2021 11:12:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:47292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344523AbhGSPKj (ORCPT ); Mon, 19 Jul 2021 11:10:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9BBD461264; Mon, 19 Jul 2021 15:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626709879; bh=4IG6gmizIJJXG3ujUKlj9tPQg7Xe/8JS38uDa1wvkzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vui9b9y+9h2GZikoJEr+0JbcQLwNP4RP9afkSvPrJK9nqk64bcD1KAZOaILhCaUF8 qX/QZGHrjZoiqGzDmG8QvzzivsZxTIS3F4qwdh6db2iEOjMenj+Oe3/edY1PerU4zl wsN/cbt1fJcGNDEvCgMqOc3gO7fChJBj2RqxQmJw= 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.4 101/149] um: fix error return code in slip_open() Date: Mon, 19 Jul 2021 16:53:29 +0200 Message-Id: <20210719144925.320280625@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144901.370365147@linuxfoundation.org> References: <20210719144901.370365147@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 8016d32b6809..8d736eb62961 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;