This patch adds checking of driver registration status
and release allocated resources if it failed.
Signed-off-by: Cyrill Gorcunov <[EMAIL PROTECTED]>
---
Pete, Ack it please
drivers/usb/misc/ftdi-elan.c | 18 +++---
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git
On Wed, 28 Mar 2007 20:00:32 +0400, Cyrill Gorcunov <[EMAIL PROTECTED]> wrote:
> result = usb_register(&ftdi_elan_driver);
> -if (result)
> +if (result) {
> + destroy_workqueue(status_queue);
> + destroy_workqueue(command_queue);
> + des
Pete, Luiz
check this one please.
I've inspected ftdi-elan.c for style and as result
the solution I propose is just to add explicit
destroying of worqueues if usb_register failed.
And Pete, take a look - whoa! - I've renamed error labels :)
Cyrill
---
drivers/usb/misc/ftdi-e
[Pete Zaitcev - Tue, Mar 27, 2007 at 10:51:16AM -0700]
| On Tue, 27 Mar 2007 19:14:05 +0400, Cyrill Gorcunov <[EMAIL PROTECTED]> wrote:
|
| > --- a/drivers/usb/misc/ftdi-elan.c
| > @@ -2903,7 +2903,7 @@ static struct usb_driver ftdi_elan_driver = {
| > };
| > static int __init ftdi_elan_init(voi
On Tue, 27 Mar 2007 19:14:05 +0400, Cyrill Gorcunov <[EMAIL PROTECTED]> wrote:
> --- a/drivers/usb/misc/ftdi-elan.c
> @@ -2903,7 +2903,7 @@ static struct usb_driver ftdi_elan_driver = {
> };
> static int __init ftdi_elan_init(void)
> {
> -int result;
> +int result = 0;
Why do y
[Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 02:29:04PM -0300]
| Em Tue, 27 Mar 2007 21:01:25 +0400
| Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu:
|
| | [Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300]
| | | Em Tue, 27 Mar 2007 19:14:05 +0400
| | | Cyrill Gorcunov <[EM
Em Tue, 27 Mar 2007 21:01:25 +0400
Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu:
| [Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300]
| | Em Tue, 27 Mar 2007 19:14:05 +0400
| | Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu:
| |
| | | Pete, Luiz
| | |
| | | what about this one?
[Luiz Fernando N. Capitulino - Tue, Mar 27, 2007 at 01:28:39PM -0300]
| Em Tue, 27 Mar 2007 19:14:05 +0400
| Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu:
|
| | Pete, Luiz
| |
| | what about this one?
| |
| | Actually there is just a check for where is error coming from.
| | Maybe that is not th
Em Tue, 27 Mar 2007 19:14:05 +0400
Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu:
| Pete, Luiz
|
| what about this one?
|
| Actually there is just a check for where is error coming from.
| Maybe that is not the best solution but it allows us to reduce
| the calls to 'printk' :)
|
| P.S. Pete you
Pete, Luiz
what about this one?
Actually there is just a check for where is error coming from.
Maybe that is not the best solution but it allows us to reduce
the calls to 'printk' :)
P.S. Pete your patch is good but the message about
worqueue creation fail was to print even if we've
been faltere
On Sun, 25 Mar 2007 11:27:33 +0400, Cyrill Gorcunov <[EMAIL PROTECTED]> wrote:
> This patch adds checking of driver registration status
> and if it fails release allocated resources.
> + if (status_queue) {
> + destroy_workqueue(status_queue);
> + status_queue = NULL;
Em Mon, 26 Mar 2007 23:33:12 +0400
Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu:
| if usb registration failed we should release all worqueues we've
| created and that is the reason why I've changed the code...
I see, maybe something like the following (not tested):
diff --git a/drivers/usb/misc
[Luiz Fernando N. Capitulino - Mon, Mar 26, 2007 at 03:43:57PM -0300]
|
| Hi Cyrill,
|
| Em Sun, 25 Mar 2007 11:27:33 +0400
| Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu:
|
| | This patch adds checking of driver registration status
| | and if it fails release allocated resources.
| |
| | Sign
Hi Cyrill,
Em Sun, 25 Mar 2007 11:27:33 +0400
Cyrill Gorcunov <[EMAIL PROTECTED]> escreveu:
| This patch adds checking of driver registration status
| and if it fails release allocated resources.
|
| Signed-off-by: Cyrill Gorcunov <[EMAIL PROTECTED]>
|
| ---
|
| Pete, please review the patch
This patch adds checking of driver registration status
and if it fails release allocated resources.
Signed-off-by: Cyrill Gorcunov <[EMAIL PROTECTED]>
---
Pete, please review the patch and Ack it then.
drivers/usb/misc/ftdi-elan.c | 37 +++--
1 files changed,
15 matches
Mail list logo