linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Bernard Zhao <zhaojunkui2008@126.com>
Cc: "Wolfgang Grandegger" <wg@grandegger.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Stefan Mätje" <stefan.maetje@esd.eu>,
	"Vincent Mailhol" <mailhol.vincent@wanadoo.fr>,
	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
Date: Wed, 11 May 2022 08:44:50 +0200	[thread overview]
Message-ID: <20220511064450.phisxc7ztcc3qkpj@pengutronix.de> (raw)
In-Reply-To: <20220511063850.649012-1-zhaojunkui2008@126.com>

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

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

-- 
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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-05-11  6:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  6:38 [PATCH] usb/peak_usb: cleanup code Bernard Zhao
2022-05-11  6:44 ` Marc Kleine-Budde [this message]
2022-05-11  7:11   ` z
2022-05-11  8:28     ` Vincent MAILHOL
2022-05-11  8:46       ` z
2022-05-11  8:47       ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220511064450.phisxc7ztcc3qkpj@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=bernard@vivo.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stefan.maetje@esd.eu \
    --cc=wg@grandegger.com \
    --cc=zhaojunkui2008@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).