Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 23, 2019 at 9:55 PM Sergei Shtylyov
<sergei.shtylyov@xxxxxxxxxxxxxxxxxx> wrote:
> On 10/23/2019 06:31 PM, Tony Lindgren wrote:

> > +     int error;
> > +
> > +     error = pm_runtime_get(cdd->ddev.dev);
> > +     if (error < 0) {
>
>    I'd call that variable 'status', comparison (error < 0) just doesn't look right.
> If it was *if* (error), it would have been more correct.

It's error when it's negative. That's how PM runtime is designed.

> > +             pm_runtime_put_noidle(cdd->ddev.dev);
> > +
> > +             return NULL;
> > +     }

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux