Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6665098iob; Wed, 11 May 2022 02:38:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFniCISczpZN56LhYZppkoKKvciZKF7956VEYqfoqAKFCdtfQnFDySb9jlvn0qkGDNBNcp X-Received: by 2002:a17:907:94cd:b0:6f9:f69f:2fd9 with SMTP id dn13-20020a17090794cd00b006f9f69f2fd9mr15142937ejc.654.1652261938301; Wed, 11 May 2022 02:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652261938; cv=none; d=google.com; s=arc-20160816; b=k+vOZLURybCFPxWc4fd/E0iwfSoydOhEKQleEI6JMTNUy+Qj5Op9Jete8fNzps0hhU juyO71OpPXWQDWSTW9YUghC5t2TUVVHEkYv8s6WWgEEl3lk6NvCAlua9Lm6D+Ki30+JN tQy2T4/FjxD+f/RslbR03OhowcP6D8wkLsL4BLvrDWplU09m/MV5ouzJUy+B/aoHn7Yy i2b3t0jWT0xeE+LPaCNy1Rfk7lesozAObHQkHWJySR4Rl+ybiJPN8lnpuJ4Xetiibb6o cgq22FIrpNLQMZdwnvfrwUN6Djjdt3g4BgNF1AOK1hF692te/qxI6yt/tx2srouJJYnC HErA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=6RUEUdwDm15IKuK+qmf5RzTTzvevTLku7r53SyrpzYc=; b=ZC4pHY5KlcI38RK/UmPqx8o6kqAVCY5iZwJ8p22KpDu3I2XIOgd6Bm+fFyFOoU8AFj jg/9sXIy0qlw/lQWtES7eFYcaIHfEtwBiWYbRgNl1RFz1VKHRF3fq6FJ+txFS9WKSE5R gExUX5xBDL3TGRJbZp6TRu6cL9qLR6Ul+iSxGRDt6iSqLZ5WvUmXLFTt5OBFAcMd71Gt 6x7Eggnpn0Or8JrZKwxvFDreWaq2B/TboOFEdGk/Jfqn4KE5LFYHH4pkvQITHJvnYdhu UvkdIiVydZnqVsHXnTpJJrveXmMnRDfLMz/l12sKGaiqVIwJM+Y30LCiWzHlSvxLg7M0 aYXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz12-20020a0564021d4c00b0042146612117si2120064edb.562.2022.05.11.02.38.34; Wed, 11 May 2022 02:38:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242276AbiEKGpO (ORCPT + 99 others); Wed, 11 May 2022 02:45:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237570AbiEKGpM (ORCPT ); Wed, 11 May 2022 02:45:12 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1AC313FD76 for ; Tue, 10 May 2022 23:45:11 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nog5d-0005UM-PD; Wed, 11 May 2022 08:44:53 +0200 Received: from pengutronix.de (unknown [IPv6:2a01:4f8:1c1c:29e9:22:41ff:fe00:1400]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 13FD27B124; Wed, 11 May 2022 06:44:51 +0000 (UTC) Date: Wed, 11 May 2022 08:44:50 +0200 From: Marc Kleine-Budde To: Bernard Zhao Cc: Wolfgang Grandegger , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Stefan =?utf-8?B?TcOkdGpl?= , Vincent Mailhol , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bernard@vivo.com Subject: Re: [PATCH] usb/peak_usb: cleanup code Message-ID: <20220511064450.phisxc7ztcc3qkpj@pengutronix.de> References: <20220511063850.649012-1-zhaojunkui2008@126.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dq7m2atvmyrifx54" Content-Disposition: inline In-Reply-To: <20220511063850.649012-1-zhaojunkui2008@126.com> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --dq7m2atvmyrifx54 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 10.05.2022 23:38:38, Bernard Zhao wrote: > The variable fi and bi only used in branch if (!dev->prev_siblings) > , fi & bi not kmalloc in else branch, so move kfree into branch > if (!dev->prev_siblings),this change is to cleanup the code a bit. Please move the variable declaration into that scope, too. Adjust the error handling accordingly. regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --dq7m2atvmyrifx54 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmJ7W18ACgkQrX5LkNig 013BNgf+P67Oin0cXNemqeEdYw4/XZiAPTSqYELYFmJ+aSFuL+/0bT98LwE+3Age wuaDlSZrLAYnB8FiOyISV6Hgmqubw46mukSn7KRZUrEyug4ca2U4SbKXU8IyZP9z c07Ufpyk3lDSMOunJoyaNt37gF/JiCz7+adtnh3ipvGUy2/VwRdmmundl9U6cC02 3YawFRwA3Qju7VTYB0oEdA4EnxJ2y5OpnZvnBD1oOu8btEHW1pvptR324KW+NNlm hO4/wFzPH37GICxmgUm9kHbBdqA3bZA3PnmbaZHaSSq8jEsgkb2pc9I5+FF8r6cb OD0zhBSE5km2+JCEtKQNFBYoFtfOhw== =tSaC -----END PGP SIGNATURE----- --dq7m2atvmyrifx54--