lkml.org 
[lkml]   [2019]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] ethernet: ti: fix possible object reference leak
From
Date
> @@ -3657,12 +3657,16 @@  static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
>
> ret = netcp_txpipe_init(&gbe_dev->tx_pipe, netcp_device,
> gbe_dev->dma_chan_name, gbe_dev->tx_queue_id);
> - if (ret)
> + if (ret) {
> + of_node_put(interfaces);
> return ret;
> + }
>
> ret = netcp_txpipe_open(&gbe_dev->tx_pipe);
> - if (ret)
> + if (ret) {
> + of_node_put(interfaces);
> return ret;
> + }
>
> /* Create network interfaces */
> INIT_LIST_HEAD(&gbe_dev->gbe_intf_head);

Would you like to move such duplicate statements to an additional jump target
for the desired exception handling?

Regards,
Markus

\
 
 \ /
  Last update: 2019-04-05 10:29    [W:0.068 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site