lkml.org 
[lkml]   [2006]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: compile error when building multiple EHCI host controllers as modules
Date
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-28 19:55    [W:0.102 / U:36.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site