Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2378368lqp; Sun, 24 Mar 2024 16:44:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUT07bF3QtVxxUcfhn+LbIohsuS/5lBNdHW3pdrkEvrSl22QNwRPWTfX0lFrP4qUCcPBzYrTd1zgRLeqj+vKL0ggI6mNDPyRo738ZPesQ== X-Google-Smtp-Source: AGHT+IF/fkhcXjlA687fHpkftRmAAs+1FkyiBGuKjbf6h9dHUQ6MajHD+Y3L82lXRieYO1dfW817 X-Received: by 2002:ae9:e319:0:b0:78a:34be:655e with SMTP id v25-20020ae9e319000000b0078a34be655emr6360233qkf.36.1711323887143; Sun, 24 Mar 2024 16:44:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711323887; cv=pass; d=google.com; s=arc-20160816; b=emZBvX2IJ7OdGiizDv4J/SuIMXaDJyCbIiSW1Tm+91EnyLKjUEWVLCRIRTMqOgAl+M xMwnbzKLzQdBFfZ8j1IOJRCvo/zKvi+Xpn995buY3HPdd7pzt2zOTNdXGOKDreXWkKDY QgIbM+zzbqp/KwrY75jG8BtBRWKtuV7Bn4G752aFc7IsnrcBaIbsFJ0w7KNMb8l3HrPD Vbk5qtZQJYTfBjaSMy+30bh2H751HpRn/AwPUGvjwTun4gacx56DLyqHMnCk/FX8oier 4F66tg5lkDtjBSQU+txoiJUrKhOWS/VqcvvntTkjSLZPm4n+keB/u1wYiT4ox68BXuZT dZEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4jJX6/e0NWM/jIhsuCx2NUG+vaB9+L3Jg95u9c05lM8=; fh=4n9EA4p0Mcl5o1IOsjqqUeA926qpNyCeMo7SOmifuYE=; b=PsUZXAP1Dh3RUAenGrKYnxghaqiY7sunyP1/EmLMc1N7fSnCe72W0x2EVxAe3Nw1XS Ieu+BSf13qmZM+F09o4DiVUK/YcreSyAT0lpkp0s/vUeB6GpL01Nng1RUMGBQ3T2ohB7 bepsII2VpEHfYykQYDaZiCOo6ipePkGfWPU+AAfFTOttYJrW5c/gEi+eP/PfVpobDVZz 4WHJ4jkZaVIn+xc5y89HeCl1s5oxIIRsKDBVcClrPMgv/E3cR/va2eXfNSP9SIhkaM7t z8trjM2/SnAgGBDPU8TrnUuTLXa888OTXlTRlYc/U6Te5p/l1w6ShUAmzhyBFd+L/M8W N1kw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=feaTqofB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113208-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l11-20020ae9f00b000000b0078a5167b1d6si2065063qkg.630.2024.03.24.16.44.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:44:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113208-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=feaTqofB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113208-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D394A1C22743 for ; Sun, 24 Mar 2024 23:44:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1696517E3BA; Sun, 24 Mar 2024 22:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="feaTqofB" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11D865C8FE; Sun, 24 Mar 2024 22:40:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320010; cv=none; b=OQN1RFRN9j2IgLNUHiHMSetXrMdS0BnU+QaTRb060HSHmH1MNJ6SPFTRdlOQ9L72zIZ5jCd+EaPo077BRRZJheDsx6Xe7hJhigkCdqwCt4pqUB0tR5ZBEW9iYO2U40up/cT/zLeYmvLtqbr2PyhnNFxpwEeiY0sbY3/SSsRrgUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320010; c=relaxed/simple; bh=36c3PdCk3dmv9ATi1Ur1ycwjHJ3q6K33jYl8d79ERfA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=alYNFwntKb16zWvF4QltrjuR4Df1sdL7I0uYj0xzUs+vlbFwHrdzILK/Vie2qO/DtJ9uJk6wJDHx9IP2JeJ9oHeNfZ/ISVMfLb7eVBN8kquCNEdPBWo5qfDWpo+eiP0QqYfkCZS/tqPWzMBkc3e7ALGF4WIGIym6d8z+1FYTLA0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=feaTqofB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2773AC433F1; Sun, 24 Mar 2024 22:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320009; bh=36c3PdCk3dmv9ATi1Ur1ycwjHJ3q6K33jYl8d79ERfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=feaTqofBFW+tTsRuBBb777SJH5+qCGCW6jfiAl257mXzabB7FeIckj50jBI2KQEZE gPw+UUhCj5/kEIUaXU64A6sdFWwUPmqf1Cwv7VH0Z7idsktZp0wSo4lgdZ2PSs1j3o wiPCKsBpMNhZ3lwhEuvArt4qd7EJYs05GKVPWUFCMdGOOzbJewPkcc7KBa+KidNWmN MihF4nH20FEpGgHmEXeVay7ZzO0dBToYOQAYv5IDKmaSvz7oBrEq5QjgGWFYc6Wcfx 6LrmiPkF3RYps9CejMBCUUaJkw/i/sjVs3YAkLLKhXCKjvDYIkh9/o+1/eSQ5tMVkr XGJUW80RCmWdQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chen Ni , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.8 317/715] sr9800: Add check for usbnet_get_endpoints Date: Sun, 24 Mar 2024 18:28:16 -0400 Message-ID: <20240324223455.1342824-318-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Chen Ni [ Upstream commit 07161b2416f740a2cb87faa5566873f401440a61 ] Add check for usbnet_get_endpoints() and return the error if it fails in order to transfer the error. Signed-off-by: Chen Ni Reviewed-by: Simon Horman Fixes: 19a38d8e0aa3 ("USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800 Device Driver Support") Link: https://lore.kernel.org/r/20240305075927.261284-1-nichen@iscas.ac.cn Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/usb/sr9800.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/sr9800.c b/drivers/net/usb/sr9800.c index 143bd4ab160df..57947a5590cca 100644 --- a/drivers/net/usb/sr9800.c +++ b/drivers/net/usb/sr9800.c @@ -737,7 +737,9 @@ static int sr9800_bind(struct usbnet *dev, struct usb_interface *intf) data->eeprom_len = SR9800_EEPROM_LEN; - usbnet_get_endpoints(dev, intf); + ret = usbnet_get_endpoints(dev, intf); + if (ret) + goto out; /* LED Setting Rule : * AABB:CCDD -- 2.43.0