Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp277786lqd; Wed, 24 Apr 2024 01:50:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlzCqBnpQL+Oj7bEfjmAHza4B9k+YSUCoB+0bY+PBHCAALZFc69oqsTzggYVHfHbIcTW2F3J0cPpNO4B8pTxgNrqKwPNySV+EQKY3t/A== X-Google-Smtp-Source: AGHT+IHSKEeyK7JLsnQkUgxT4cu6P360Q2amLQX2XRYecJ9xcZbFP73G1q8N1kFO+caWTtfV6OED X-Received: by 2002:a05:6808:130f:b0:3c5:f70d:f83 with SMTP id y15-20020a056808130f00b003c5f70d0f83mr2085801oiv.18.1713948608578; Wed, 24 Apr 2024 01:50:08 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a16-20020a637050000000b005dc4f8a376asi6823673pgn.884.2024.04.24.01.50.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 01:50:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=selector1 header.b=XMEL7piG; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-156574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F0F382859D4 for ; Wed, 24 Apr 2024 08:50:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79CFD158A26; Wed, 24 Apr 2024 08:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=marvell.com header.i=@marvell.com header.b="XMEL7piG" Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (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 EED60D29E; Wed, 24 Apr 2024 08:49:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.156.173 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713948590; cv=fail; b=VZKwhxYHc+7jjH+S6FCxqt/riXCD11iKAghrpccnjk2DuqhMnwRwwWeASCT6x0tHLCscT+UIfifMGAEryPIf3GjTd6iOkEfYpa/T4vh1DTNbm4LznDT5gJNQZ0RgS6O4i0plD4GtUYk41ZnyaJDErn6eivbv9pSN5fW8eOU4kHQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713948590; c=relaxed/simple; bh=Ygq7oTPuF6G0m8hmLbkihgdybSHUR/1hNBGHrXOzSn8=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=TnBHnY/RfvMBgf9AOsOzO+xI6pgpKshXEyBXem0WUI7y463BmKY4RzkSCAf8d94MKhLRORsuA4SCbWRS9tfbetCpjZXiVM2aFkOsx1Remanw1kIwrFUWfT2MxGf3H3OyBInpdcdz5c20uXZMuLnAOWaC4OhtmQenObjAkOuvPME= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (1024-bit key) header.d=marvell.com header.i=@marvell.com header.b=XMEL7piG; arc=fail smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43O8VvWB011632; Wed, 24 Apr 2024 01:49:31 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3xpxn181j6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 01:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yz/g3AEPf8i2tKab+wLUM5reA9EPvGLtRgol+Sujlb5HowVMySrrKUEZqWX3TnwViSxm8chsX6euarPIPHjxPpGVHECs6k2TBwlKcQKMcVPeb27Bk70s5gbkjqZ3UkrOfnnfXdqLU8HVmwlO2bATXgKdON4VUK0QnOOExhEOI6so8RE0OG7OBLyZGNombjeVFp+xhsX3tKlbG18nlxvyYjNuoWIcmw30x408S6nSNv82Z4pqgnWElzz5VmyzX+8MvV4vXjz8cjKT4aBsQ7UJtvHKAKO34y+HLXKryLt1s1/NTU0CMpxJ8F2imDZ1dYJ0hgZpPQMlW06/1tFSiTJheg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9HepDfEbXVy7cf5oEc44ItWM3gxVLfLcoSZArE8YHjM=; b=LtaNACY4Ucjm/WNvHfqdCX7KNvlRQTXigPJZ2lOEvnJ8vO9oMvZCFajYjLmSMt848XOJNwHlMWl1RsXQooKQT/atMP3HFRHGOHLhcqta6YxqwhO11pfj6bQUlBKtn7Z+/d3dYMe+SM7ULFdM9JhLwgDzHd/saQG7/eZD5vsNWOtqMho425S4IZyWh24ONeVqsfr6YIMEWxsz9KmZerw3dUIgPmF1xF/tIA35ZFczJBQr4Lt0BumqdBDXShm9PQdEv/IaDBeq6GFFO6kY6sDbXDKWQYM2/Dpz/DcvbIGuilAHD9wqxFBAPeB+JhyGZcFxR2EUPYUE2wiJc1FGOi3msQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9HepDfEbXVy7cf5oEc44ItWM3gxVLfLcoSZArE8YHjM=; b=XMEL7piGUVucUb9rJ75CR1cl038xjKFzaTJOEjMk9fuhCy70S2YQs8YEbjTcTdpeLgPnrQGn119NurJzgleG4ExJnb+XixTID5qNzsTGJcjP541bvkHOZ7buM0qtLI6N8v/jPEf0jb4kR5rjUNUlnbFYAAuHPzY/oF7q9jKlp+s= Received: from PH0PR18MB4474.namprd18.prod.outlook.com (2603:10b6:510:ea::22) by LV8PR18MB6345.namprd18.prod.outlook.com (2603:10b6:408:25a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Wed, 24 Apr 2024 08:49:29 +0000 Received: from PH0PR18MB4474.namprd18.prod.outlook.com ([fe80::eeed:4f:2561:f916]) by PH0PR18MB4474.namprd18.prod.outlook.com ([fe80::eeed:4f:2561:f916%5]) with mapi id 15.20.7452.049; Wed, 24 Apr 2024 08:49:28 +0000 From: Hariprasad Kelam To: Ma Ke , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "jtornosm@redhat.com" , "andrew@lunn.ch" , "horms@kernel.org" , "hkallweit1@gmail.com" CC: "linux-usb@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v2] net: usb: ax88179_178a: Add check for usbnet_get_endpoints() Thread-Topic: [PATCH v2] net: usb: ax88179_178a: Add check for usbnet_get_endpoints() Thread-Index: AQHaliRRcDo5OyEMNEajq5TWcjfJPw== Date: Wed, 24 Apr 2024 08:49:28 +0000 Message-ID: References: <20240424065634.1870027-1-make_ruc2021@163.com> In-Reply-To: <20240424065634.1870027-1-make_ruc2021@163.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4474:EE_|LV8PR18MB6345:EE_ x-ms-office365-filtering-correlation-id: 4c3109e8-5d0f-4e44-93e6-08dc643b73db x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?us-ascii?Q?O+Nr/JA14fNi8XmI7xjDggjyBXr3dOTLePg4gBbpKm9LZQwyR2KvnvPS1Xqj?= =?us-ascii?Q?aMQxmhfyM5OOnGCZxwnu3/1HXNi3RCQ049wGchTl3HfSKAUpCfrDWgNQT4XO?= =?us-ascii?Q?dghY7/4a7Uq/euDwta/n1xGqh4pVNCEZdoS2aLURJ4tftRf4ov+F7LX74kqB?= =?us-ascii?Q?xbztId0UI+mPlJbNLSv13bo3QlwRmbfIkdrmLb06kufuZLwsaugzjPI4V45z?= =?us-ascii?Q?MW1awYVUaDJIJx+mDKrjV6onCVOtB970LNvOXcH9IFRFDzCu1GSnxBvh8Rwb?= =?us-ascii?Q?6Lm7M/1voadogM/XS3UHGQULFjVfna8uVHeVIAsI2uC7QcAzu28e3V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QHnz/Ejt2t2+YEfkOCbwkfwfBeGclNJ4t74gBuV6y0anZ?= =?us-ascii?Q?+Q4NU0Kn0ktKIV5I9ICdWsnNqNBqNpAOLfHhGIRWIpD9sFAV7H9jr2tqJzgf?= =?us-ascii?Q?ug5SM3k7PgRHA7K6tSZqQw2SuqoWah+Ys14GqQrjsOQFIg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR18MB4474.namprd18.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(7416005)(366007)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?c+OHRP+uE1h+jGoBxpdP+ks6IQgBLGX43Ren81vQ+PZI5miugD5JPNm+9AgR?= =?us-ascii?Q?sXdbOibqK/6Q308hXBdTifgyNDTo2O+/iwIxxDp99f7F0SFDTXpTow2CU0Uu?= =?us-ascii?Q?2+3X+WkuxtCQaSKJIFcqx+7lHXmT1BTQIBDixH/7MczyVDZR/cutxDSVJCid?= =?us-ascii?Q?4xkEoqnad1FHwHWVUOzxOw50n6Tf4QMP8kIaw9wN65RR86YUzsCAjEOlh5bI?= =?us-ascii?Q?YfP2wtQ/OpduCxyBx1lWAIfLVS6BpihD+12KHcPavzm0I7NzBh8YtxHjK23x?= =?us-ascii?Q?Lcvupci9iKgNDygiVtJcEsHLi8COnO8Uk20jJRDcX8E+3H5CdRDZgueawAmy?= =?us-ascii?Q?MdZwImIu+O+/FkfG7ksC1a4Dqo+yAUN4toQKRusTVABH2wUXXLjMbu6UELMH?= =?us-ascii?Q?qS1pd8CDv/+cRXceYmMRVr9NK+JEMh2yK/EOzfvFov3mvP32qviRKwIP6e3h?= =?us-ascii?Q?ix4CPvDhjhqZn1XKpX606QogvGfxHEtpndcXNISWcr5Eg/6tuVuW5/luc94y?= =?us-ascii?Q?QnUkDwC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axn?= =?us-ascii?Q?Ef/UDuc5JC/z27ssEYj5ve5H7aoIqa6NEG8fijlTi1YycA41OxVkUG/xi3Cz?= =?us-ascii?Q?gOEsj2DYT5d/q8CdbITeeQ557SJ4KVvRNn1ErcM+kNKn9lcSvG7H/Vipo+Ct?= =?us-ascii?Q?llsKjgzUSzqI/ek8QMo=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4474.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c3109e8-5d0f-4e44-93e6-08dc643b73db X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2024 08:49:28.8816 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hazs87SUytDiHvbeDgFnxgtWIQVCAxTv1DTVe599qY/RqL2Xl9xa9NCgiiIuuyVVsriLbbla52orATsIpX723w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR18MB6345 X-Proofpoint-GUID: CxpAUFxRb6CWYJCMKbAn9wfOeu7aSppC X-Proofpoint-ORIG-GUID: CxpAUFxRb6CWYJCMKbAn9wfOeu7aSppC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_06,2024-04-23_02,2023-05-22_02 > To avoid the failure of usbnet_get_endpoints(), we should check the retur= n > value of the usbnet_get_endpoints(). >=20 > Signed-off-by: Ma Ke > --- > drivers/net/usb/ax88179_178a.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/usb/ax88179_178a.c > b/drivers/net/usb/ax88179_178a.c index 752f821a1990..388ea178c91d > 100644 > --- a/drivers/net/usb/ax88179_178a.c > +++ b/drivers/net/usb/ax88179_178a.c > @@ -1287,8 +1287,11 @@ static void ax88179_get_mac_addr(struct usbnet > *dev) static int ax88179_bind(struct usbnet *dev, struct usb_interface *= intf) { > struct ax88179_data *ax179_data; > + int ret; >=20 > - usbnet_get_endpoints(dev, intf); > + ret =3D usbnet_get_endpoints(dev, intf); > + if (ret < 0) > + return ret; >=20 > ax179_data =3D kzalloc(sizeof(*ax179_data), GFP_KERNEL); > if (!ax179_data) > -- > 2.37.2 >=20 Nit: please include patch change log, below link required info https://docs.kernel.org/process/submitting-patches.html Reviewed-by: Hariprasad Kelam