From: Dave Wiltshire <dunlucky1@gmail.com>
To: Oliver Neukum <oneukum@suse.de>
Cc: Ming Lei <ming.lei@canonical.com>,
Steve Glendinning <steve@shawell.net>,
netdev@vger.kernel.org
Subject: Re: Dealing nicely with PM failure
Date: Sat, 15 Dec 2012 22:14:56 +0800 [thread overview]
Message-ID: <20121215141456.GA1341@linux-rbgc.site> (raw)
In-Reply-To: <3581886.3cmiB2PA1J@linux-lqwf.site>
On Fri, Dec 14, 2012 at 03:56:26PM +0100, Oliver Neukum wrote:
> @@ -793,15 +794,15 @@ int usbnet_open (struct net_device *net)
> // delay posting reads until we're fully open
> tasklet_schedule (&dev->bh);
> if (info->manage_power) {
> - retval = info->manage_power(dev, 1);
> - if (retval < 0)
> - goto done_manage_power_error;
> - usb_autopm_put_interface(dev->intf);
> + int r;
> +
> + r = info->manage_power(dev, 1);
> + if (r < 0)
> + set_bit(EVENT_NO_RUNTIME_PM, &dev->flags);
> + else
> + usb_autopm_put_interface(dev->intf);
> }
> return retval;
Did you mean to change the return value in the successful case? This
used to return 0 on a successful call to info->manage_power(dev, 1).
This patch changes that - perhaps it's still the same (if retval is set
above).
Dave
next prev parent reply other threads:[~2012-12-15 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 14:56 Dealing nicely with PM failure Oliver Neukum
2012-12-15 14:14 ` Dave Wiltshire [this message]
2012-12-15 14:33 ` Ming Lei
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=20121215141456.GA1341@linux-rbgc.site \
--to=dunlucky1@gmail.com \
--cc=ming.lei@canonical.com \
--cc=netdev@vger.kernel.org \
--cc=oneukum@suse.de \
--cc=steve@shawell.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).