From patchwork Mon Jul 19 14:52:43 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: 480009 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4279215jao; Mon, 19 Jul 2021 09:20:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziAjYAoIsugJSwOkW7qky16pdftKzfPZ05+EUWHesZFT0U9nINL57L66CYrR4hQhDWOByc X-Received: by 2002:a17:906:3016:: with SMTP id 22mr27342290ejz.28.1626711659225; Mon, 19 Jul 2021 09:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626711659; cv=none; d=google.com; s=arc-20160816; b=vJi8CsQ7xhlFk0ficKfS4OyaOAy/I7BI03xwi4qt1M8/tcPp8QBNGZSnCXlgtMBv2c 3I7npM490/UjJnqKF+rFjtsO84AxIuMKmbWpS9aiHftJI3FgVTu8+1Of1jw2Hjnlpq9T 5m2zmdutrE4uTXTNIhvGdN6ngm/hGBhYxpJLbL0KtTYth0ypVdCFZvReSz2aN4XImHcl DuJtz6g/KLfBM6qhbc5711o9KE22HrBS3lUHHniEDij58q7/yME5zfNYBXkDH4noAKfo y60GYUPTF5PskcH6Zqiz7oMQoSU8BGAQx+779Ioc4H652el3UtSMH5dWS52rt3ZsAmMJ PELQ== 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=FCMJiMRpZCaLEzr+bibSBCGXfxN9o4UrQD2Q9bSqgSExawlV35vgKIvgQncpX0HiHt 1bdJXqSwvbjSFYENx35RJ9ytt/WqzRPTbGSWmAmxtrOt0DdDNRMwiTzpk6xoXuGtLfTt 42RbFD0kRVMBZtdcxY9CP7aPAnkbyjI23UTxGyym24rdcPp6yc/rYyENxpy3YVd/+o4P S0QSvCtRoRk6ZWZ+MTYS6zS8atokv4QevQpbENSCfpvg1Pai2TpMVyYVEI5msrTFJmh4 bnCTYPEbxmoGqnof6/HTvaZEDj871GjJURqxr3uOzsBqZjdcosk4ewM3m7aGPrMBzg9j UKwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gVaQw8QN; 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.20.59; Mon, 19 Jul 2021 09:20:59 -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=gVaQw8QN; 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 S236520AbhGSPhV (ORCPT + 12 others); Mon, 19 Jul 2021 11:37:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:59724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236150AbhGSPeN (ORCPT ); Mon, 19 Jul 2021 11:34:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4D65E61428; Mon, 19 Jul 2021 16:11:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626711070; bh=UxX7E/3Wyq0jhAF9czvnldpvgqX6Mzs0NdJQVvqk8Rg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gVaQw8QN7VOBV9IQOaq48e/Wv85pf4ROX0VG4AtaFxTdhamm8Hj3NVYhz+ajMj69H DCKjim6cNoOC87FUbZIHlD3skdVL+/SVmwNpDMbOA0SyPA5yjD/hg4Pie5q7LxaSsN OvWWXUpqqgjTP1JL/daUurVxPgPr8IWSFNP/z98o= 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.13 217/351] um: fix error return code in slip_open() Date: Mon, 19 Jul 2021 16:52:43 +0200 Message-Id: <20210719144952.134610741@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144944.537151528@linuxfoundation.org> References: <20210719144944.537151528@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;