Re: [PATCH 3/3] ethernet: ti: fix possible object reference leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux