lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] isoc: mediatek: Check for error clk pointer
On Sat, Dec 18, 2021 at 01:30:05AM +0800, Jiasheng Jiang 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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-12-21 18:58    [W:0.269 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site