All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Rahul Ruikar <rahul.ruikar@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Dan Carpenter <error27@gmail.com>,
	nm127@freemail.hu, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: goku_udc: Fix error path
Date: Mon, 04 Oct 2010 14:46:21 +0400	[thread overview]
Message-ID: <4CA9B07D.8080202@ru.mvista.com> (raw)
In-Reply-To: <1286115016-2759-1-git-send-email-rahul.ruikar@gmail.com>

Hello.

On 03-10-2010 18:10, Rahul Ruikar wrote:

> call put_device() when device_register() fails.

> Signed-off-by: Rahul Ruikar<rahul.ruikar@gmail.com>
[...]
> diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
> index 1088d08..080779b 100644
> --- a/drivers/usb/gadget/goku_udc.c
> +++ b/drivers/usb/gadget/goku_udc.c
> @@ -1847,8 +1847,13 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>   	/* done */
>   	the_controller = dev;
>   	retval = device_register(&dev->gadget.dev);
> -	if (retval == 0)
> +	if (retval != 0) {
> +		dev_reg_status = 2;
> +		goto done;
> +	} else {
> +		dev_reg_status = 1;

    Did you mean 'dev->dev_reg_status'?

>   		return 0;
> +	}
>
>   done:
>   	if (dev)
> diff --git a/drivers/usb/gadget/goku_udc.h b/drivers/usb/gadget/goku_udc.h
> index 566cb23..c27b9e2 100644
> --- a/drivers/usb/gadget/goku_udc.h
> +++ b/drivers/usb/gadget/goku_udc.h
> @@ -251,7 +251,8 @@ struct goku_udc {
>   					got_region:1,
>   					req_config:1,
>   					configured:1,
> -					enabled:1;
> +					enabled:1,
> +					dev_reg_status:2;

    I don't see where this new field is read in your patch...

WBR, Sergei

  parent reply	other threads:[~2010-10-04 10:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-03 14:10 [PATCH] usb: gadget: goku_udc: Fix error path Rahul Ruikar
2010-10-03 16:17 ` Dan Carpenter
2010-10-04 10:46 ` Sergei Shtylyov [this message]
2010-10-04 10:50   ` Rahul Ruikar
  -- strict thread matches above, loose matches on Subject: below --
2010-10-03 19:59 [RESEND/PATCH] " Rahul Ruikar
2010-10-04 12:22 ` Dan Carpenter
2010-10-05 13:20   ` Greg KH
2010-10-05 16:55     ` [PATCH] " Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CA9B07D.8080202@ru.mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=error27@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nm127@freemail.hu \
    --cc=rahul.ruikar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.