lkml.org 
[lkml]   [2022]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] media: ov7251: add missing clk_disable_unprepare() on error in ov7251_set_power_on()
On Mon, Jun 20, 2022 at 04:48:46PM +0800, Yang Yingliang wrote:
> On 2022/6/17 18:20, Andy Shevchenko wrote:
> > On Fri, Jun 17, 2022 at 09:39:43AM +0800, Yang Yingliang wrote:

...

> > > if (ret < 0) {
> > > dev_err(ov7251->dev, "error during global init\n");
> > > + clk_disable_unprepare(ov7251->xclk);
> > > ov7251_regulators_disable(ov7251);
> > Logically it should go here. Please, read a code above this check.
> Do you mean print the error code on error path ?

The new code, you added, should be in correct order (reversed in comparison to
resource allocation / registration).

> > > return ret;
> > > }

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2022-06-20 11:53    [W:0.056 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site