Hi,
Le Fri, 24 Mar 2006 14:32:57 -0600, Kumar Gala a écrit :
> +
> +static int __init ehci_hcd_init(void)
> +{
> + int retval = 0;
> +
> + pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
> + hcd_name,
> + sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
> + sizeof(struct ehci_itd), sizeof(struct ehci_sitd));
> +
> +#ifdef CONFIG_PPC_83xx
> + retval = platform_driver_register(&ehci_fsl_dr_driver);
> + if (retval < 0)
> + return retval;
This is wrong as the first driver could failed but the following one could
be correct : imagine generic kernel were multiple config options are
enabled.
On some board we could have only one controller, on other both.
> + retval = platform_driver_register(&ehci_fsl_dr_driver);
> + if (retval < 0)
> + return retval;
> +#endif
We should unregister all the previous drivers if we fail.
Matthieu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]