lkml.org 
[lkml]   [2023]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 13/13] net: ravb: Add runtime PM support
On Mon, Nov 20, 2023 at 10:46:06AM +0200, Claudiu wrote:

...

> }
> }
>
> + error = ravb_pm_runtime_get(priv);
> + if (error < 0)
> + return error;

Hi Claudiu,

the error handling doesn't seem right here.
I think you need:

goto out_free_irq_mgmta;

> +
> /* Device init */
> error = ravb_dmac_init(ndev);
> if (error)
> - goto out_free_irq_mgmta;
> + goto pm_runtime_put;
> ravb_emac_init(ndev);
>
> /* Initialise PTP Clock driver */
> @@ -1820,7 +1862,8 @@ static int ravb_open(struct net_device *ndev)
> if (info->gptp)
> ravb_ptp_stop(ndev);
> ravb_stop_dma(ndev);
> -out_free_irq_mgmta:
> +pm_runtime_put:
> + ravb_pm_runtime_put(priv);

And the out_free_irq_mgmta label should go here.

Flagged by Smatch.

> if (!info->multi_irqs)
> goto out_free_irq;
> if (info->err_mgmt_irqs)

...

\
 
 \ /
  Last update: 2023-11-30 18:36    [W:0.280 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site