Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2579355lqp; Mon, 25 Mar 2024 03:22:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPWVIva3oUdCFAR+bLE9FDAOamSVD3HJQ6cDZtaPgpOb69P2IW1Sco1435RhOzlycd43yB/eKBibbvxocLGyvO1oYNkHBRy/fyAmRKgA== X-Google-Smtp-Source: AGHT+IHqtCivsoFth5BqnP1EaTWJppF8iES0ueC8jVKbr08DUkHqHFs2rGNR4w0a9HqitR24eCHA X-Received: by 2002:a50:8adb:0:b0:568:c6a2:f427 with SMTP id k27-20020a508adb000000b00568c6a2f427mr3742626edk.27.1711362124903; Mon, 25 Mar 2024 03:22:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711362124; cv=pass; d=google.com; s=arc-20160816; b=BB1d0HdkZIv/3jKXNNT4g9VuN4r8A6RVT+s5dz7JDTJy7AIRQiYOdie5/5bcIQ+hlu Gjhf0KVd9BpxHpYJoVHdJFAPdTcKQOgwMITCB7b4nfryPy+w/MOu7+QH/M0iHA3wbHOJ mLXBkT5oev1Z/eBOY+XsLZkDkEIczHC5vPLW1+ruJZUrm8Y+buBOB3Yb+p2eZR4pcTMQ MwQtG/DZKCckFzlPS9n22iaV2eXwEMqPD36P/+0OkA8FByUSq45H29C/g3nfw9gF94RO i1m5Tde86Swvhqo4G6M1qfRH6Gc0GBcmEpGnA0Y/oyk8xbtqhGn7Mg431ybFYr3rMpjL /vMA== 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=4472VDWMx3mX0reP0uITOHRJ1kIDsymBeXEgRtkyVBo=; fh=4n9EA4p0Mcl5o1IOsjqqUeA926qpNyCeMo7SOmifuYE=; b=W32Gr0Ytkb4VVV826HVP5DHGMdHYH7cYbbMGklTCommbrSXFbw94cGmM0Y84vC5+yW DFubn1ta78vcBkdS0iuleZRSfrRyyUPXasAmGPrSqxdyJ20+VjTTj9G53zE1yR1mnkJQ FPLu3T2kMJ1vix/qL0rZ/H6EtKnEW1AMN6NZP8+TIvoT6eU2xhuPys0Ctd2ggLmVxpBu 1rnt/TYEmI1d+mT5bs3mz+67CtELz3vS//LWILqtDfhhpSMgCV5Ra3SL5k/+b9xGbcDD Ix7UhJdyCCpaf9R+pcw2UCQrF1u6p2fxk4C55OqaJK5XZMJNXDuU7/MZe7bR2Gf8UhOa gNXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HJB+J5lc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116151-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116151-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id eb9-20020a0564020d0900b0056bb6b87559si2514632edb.216.2024.03.25.03.22.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:22:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116151-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HJB+J5lc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116151-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116151-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BB4AC1F33479 for ; Mon, 25 Mar 2024 10:16:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7526F3B267D; Mon, 25 Mar 2024 03:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HJB+J5lc" 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 6A80917AF91; Sun, 24 Mar 2024 23:41:55 +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=1711323715; cv=none; b=JBLqJZW3Bt/UUJ54oYIv0gS3BnBBVXBBUlvOokNJaChgLqOvJbAH0oV/tyq5zyGb4Kl8CKKmRHwOOH60EmpYxnRL/ZKbPERVB5IvAE/YIpTjUDZFdTtdlTkl3Hp78fre/1xo65vJZ5K81wIsWd1dvoeZt4+6Xud4WT5F+Ki/l+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323715; c=relaxed/simple; bh=ExZL3/MFyzI92yOqyU4pBDdIcGauhn5Ds3d+UzfIZ/A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ckTXINsKbfYb51B5AgEhQhq7X2j2S7Cfq5TDCGYhgq5flPav4Fz1So5i5Z1KkofoxrctmFFUTFaKnbG7PuFqxV+FYX+jpgmAIyZRu7tr7BQig7MmYgn4aqtoaNCIfA8dgDPfbjFa8kYdqxZJwgx4nFvxEcqzFLdzSMci9Nvl0NY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HJB+J5lc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46C71C43390; Sun, 24 Mar 2024 23:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323715; bh=ExZL3/MFyzI92yOqyU4pBDdIcGauhn5Ds3d+UzfIZ/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HJB+J5lcu0PX/5vhbWjMP9E11fiXPAdWGxDLTGBmSsTl+f65Va8J6/D8NTQxEOuny GORZFeCxz8S3WwVoD+ZZTAt/1XC1ygda5rXEvwDRJ3fmAsVHxGrsPL9BMx3I5xCPKQ aarQxGX2hIfRg4RQd61woEbuh4CGwQM32LwuG/fPd1txaJvuvcLTSRcGGgUCGlgzqP 72KzeTiXpHeIexSJdmEe7xoR8kqgtxi7jDTAdM2J112QTE9xvuDlC7ZkPEIOMIpzmW Fat3HHtimXV6WlkHkmyG5svVswiyIQBGu9m9DPb5zX43Tm+GOlTzq7UgPXhOFtbUwl mmDTrjjDTNAUw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chen Ni , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 088/238] sr9800: Add check for usbnet_get_endpoints Date: Sun, 24 Mar 2024 19:37:56 -0400 Message-ID: <20240324234027.1354210-89-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 681e0def6356b..a5332e99102a5 100644 --- a/drivers/net/usb/sr9800.c +++ b/drivers/net/usb/sr9800.c @@ -736,7 +736,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