Hi, Andy,

> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevche...@gmail.com]
> Sent: Friday, June 16, 2017 3:59 PM
> To: Zhi, Yong <yong....@intel.com>
> Cc: Linux Media Mailing List <linux-media@vger.kernel.org>;
> sakari.ai...@linux.intel.com; Zheng, Jian Xu <jian.xu.zh...@intel.com>;
> tf...@chromium.org; Mani, Rajmohan <rajmohan.m...@intel.com>;
> Toivonen, Tuukka <tuukka.toivo...@intel.com>
> Subject: Re: [PATCH v2 12/12] intel-ipu3: imgu top level pci device
> 
> On Thu, Jun 15, 2017 at 1:19 AM, Yong Zhi <yong....@intel.com> wrote:
> 
> Commit message.
> 
> > Signed-off-by: Yong Zhi <yong....@intel.com>
> 
> > +       /* Set Power */
> > +       r = pm_runtime_get_sync(dev);
> > +       if (r < 0) {
> > +               dev_err(dev, "failed to set imgu power\n");
> 
> > +               pm_runtime_put(dev);
> 
> I'm not sure it's a right thing to do.
> How did you test runtime PM counters in this case?
> 
> > +               return r;
> > +       }
> 

Actually I have not tested the error case, what the right way to do in your 
opinion? there is no checking of this function return in lot of the driver 
code, or simply returning the error code, I also saw examples to call either 
pm_runtime_put() or pm_runtime_put_noidle() in this case.

> --
> With Best Regards,
> Andy Shevchenko

Reply via email to