Re: Need a pairing decrement if pm_runtime_get_sync() fails?

2015-07-17 Thread Alan Stern
On Fri, 17 Jul 2015, Junjie Mao wrote: > Hi all, > > While analyzing the source, I notice that many drivers use > pm_runtime_get_sync() in the following pattern: > > err = pm_runtime_get_sync(...) > if (err < 0) { > dev_err(...); > return err; > } > > Can this lead t

Need a pairing decrement if pm_runtime_get_sync() fails?

2015-07-17 Thread Junjie Mao
Hi all, While analyzing the source, I notice that many drivers use pm_runtime_get_sync() in the following pattern: err = pm_runtime_get_sync(...) if (err < 0) { dev_err(...); return err; } Can this lead to the imbalance of runtime PM usage counter, as the counter is a