[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YcXT7bUpVL/JyAz4@sirena.org.uk>
Date: Fri, 24 Dec 2021 14:06:37 +0000
From: Mark Brown <broonie@...nel.org>
To: Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc: matthias.bgg@...il.com, lgirdwood@...il.com,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] isoc: mediatek: Check for error clk pointer
On Wed, Dec 22, 2021 at 09:51:57AM +0800, Jiasheng Jiang wrote:
> On Wed, Dec 22, 2021 at 01:57:15AM +0800, Mark Brown wrote:
> >> + for (i = CLK_NONE + 1; i < CLK_MAX; i++) {
> >> clk[i] = devm_clk_get(&pdev->dev, clk_names[i]);
> >> + if (IS_ERR(clk[i]))
> >> + return PTR_ERR(clk[i]);
> >
> > This now pays attention to the error code here which is good but...
> >
> >> - init_clks(pdev, clk);
> >> + ret = init_clks(pdev, clk);
> >> + if (ret)
> >> + return ERR_PTR(-ENOMEM);
> >
> > ...then discards it here with a random most likely inappropriate error
> > code.
>
> Yes, you are right and now the return code depending on the
> init_clks().
Please submit patches in the format covered in submitting-patches.rst -
write a proper changelog for your patches.
Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists