lkml.org 
[lkml]   [2022]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] i2c: busses: Fix error handling in synquacer_i2c_probe
On Wed, Mar 16, 2022 at 9:18 AM Miaoqian Lin <linmq006@gmail.com> wrote:
>
> Hi, Andy Shevchenko
>
> On Wed, Mar 16, 2022 at 09:04:06AM +0200, Andy Shevchenko wrote:
> >
> > > In the error handling path, the clk_prepare_enable() function
> > > call should be balanced by a corresponding 'clk_disable_unprepare()'
> > > call, as already done in the remove function.
> >
> >
> > It’s not good to mix devm approach with non-devm.
> >
> Thanks for your review. I'm sorry, I don't quite understand. Could you please explain more? What functions are your referring to? Thanks.

Your entire patch is broken. The error handling in ->probe() and
complete ->remove() now have asymmetrical ordering.

On top of that the CCF is NULL aware (and error pointer IIRC), so no
need to have additional checks.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-03-16 16:44    [W:0.038 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site