Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609117

Re: [PATCH 1/7] usb: dwc3: core: fix dwc3_probe() to not do put_sync when get_sync fails

From Felipe Balbi <balbi@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/7] usb: dwc3: core: fix dwc3_probe() to not do put_sync when get_sync fails
Date 2017-03-25 09:00 +0100
Message-ID <toOMb-67F-19@gated-at.bofh.it> (permalink)
References <toHrj-ZP-3@gated-at.bofh.it> <toHrj-ZP-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

Shuah Khan <shuahkh@osg.samsung.com> writes:
> dwc3_probe() does pm_runtime_put_sync() in its err1 handling when
> pm_runtime_get_sync() fails.  Move the pm_runtime_put_sync() under
> err2 instead as it is used in error paths after pm_runtime_get_sync()
> succeeds.

there's nothing wrong with current code. Read the docs. Even if
pm_runtime_get*() fails, you still need to decrement the usage
counter. pm_runtime_put*() is one way of achieving so.

-- 
balbi

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] usb: dwc3: core: fix dwc3_probe() to not do put_sync when get_sync fails Shuah Khan <shuahkh@osg.samsung.com> - 2017-03-25 01:10 +0100
  Re: [PATCH 1/7] usb: dwc3: core: fix dwc3_probe() to not do put_sync when get_sync fails Felipe Balbi <balbi@kernel.org> - 2017-03-25 09:00 +0100

csiph-web