Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths
@ 2020-05-09  6:15 Markus Elfring
  2020-05-09 23:45 ` Finn Thain
  0 siblings, 1 reply; 13+ messages in thread
From: Markus Elfring @ 2020-05-09  6:15 UTC (permalink / raw)
  To: Christophe Jaillet, netdev
  Cc: kernel-janitors, linux-kernel, David S. Miller, Finn Thain,
	Jakub Kicinski

> While at it, rename a label in order to be slightly more informative and
> split some too long lines.

Would you like to add the tag “Fixes” to the change description?


…
> +++ b/drivers/net/ethernet/natsemi/macsonic.c
> @@ -506,10 +506,14 @@ static int mac_sonic_platform_probe(struct platform_device *pdev)
>
>  	err = register_netdev(dev);
>  	if (err)
> -		goto out;
> +		goto undo_probe1;
>
>  	return 0;
>
> +undo_probe1:
> +	dma_free_coherent(lp->device,
> +			  SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
> +			  lp->descriptors, lp->descriptors_laddr);
>  out:
…

How do you think about the possibility to use the label “free_dma”?

Regards,
Markus

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-05-13 23:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-09  6:15 [PATCH] net/sonic: Fix some resource leaks in error handling paths Markus Elfring
2020-05-09 23:45 ` Finn Thain
2020-05-10  5:30   ` Markus Elfring
2020-05-10  8:25     ` Finn Thain
2020-05-10  9:07       ` Markus Elfring
2020-05-11  0:28         ` Finn Thain
2020-05-11  6:48           ` Markus Elfring
2020-05-12  0:08             ` Finn Thain
2020-05-12  6:38               ` Markus Elfring
2020-05-13  1:14                 ` Finn Thain
2020-05-13  5:07                   ` net/sonic: Software evolution around the application of coding standards Markus Elfring
2020-05-13 23:16                     ` Finn Thain
2020-05-11  8:20           ` net/sonic: Fix some resource leaks in error handling paths Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox