[PATCH 2/4] usb: XHCI: platform: Move the Marvell quirks after the enabling the clocks

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Jan 6 07:58:32 PST 2015


Dear Maxime Ripard,

On Tue,  6 Jan 2015 16:45:08 +0100, Maxime Ripard wrote:

> +	if (of_device_is_compatible(pdev->dev.of_node,
> +				    "marvell,armada-375-xhci") ||
> +	    of_device_is_compatible(pdev->dev.of_node,
> +				    "marvell,armada-380-xhci")) {
> +		ret = xhci_mvebu_mbus_init_quirk(pdev);
> +		if (ret)
> +			return ret;
> +	}

So on error, you're leaking the struct usb_hcd now if I'm not mistaken.
When moving code around, the error handling should also be fixed. You
probably need "goto put_hcd;" instead of "return ret;".

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the linux-arm-kernel mailing list