diff options
| author | Artem Lytkin <iprintercanon@gmail.com> | 2026-02-24 21:07:48 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-25 18:03:40 +0300 |
| commit | 24b28dc2189790810dbbc29e01759aed39dff5e3 (patch) | |
| tree | 63b5a054b2a7fc4732d31dc8e0941e48f33cd7f5 | |
| parent | 4895acd1b4306fea49ec8b7b1dcc03df8e73efbc (diff) | |
| download | linux-24b28dc2189790810dbbc29e01759aed39dff5e3.tar.xz | |
staging: most: dim2: replace IS_ERR_OR_NULL with IS_ERR for devm_clk_get
devm_clk_get() never returns NULL, so IS_ERR_OR_NULL() checks are
unnecessary. Replace them with IS_ERR() for both the "mlb" and
"pll8_mlb" clock lookups in fsl_mx6_enable().
Signed-off-by: Artem Lytkin <iprintercanon@gmail.com>
Link: https://patch.msgid.link/20260224180750.28468-2-iprintercanon@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/most/dim2/dim2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c index 92c7a7d8fe7e..cea1ba99caf7 100644 --- a/drivers/staging/most/dim2/dim2.c +++ b/drivers/staging/most/dim2/dim2.c @@ -921,7 +921,7 @@ static int fsl_mx6_enable(struct platform_device *pdev) int ret; dev->clk = devm_clk_get(&pdev->dev, "mlb"); - if (IS_ERR_OR_NULL(dev->clk)) { + if (IS_ERR(dev->clk)) { dev_err(&pdev->dev, "unable to get mlb clock\n"); return -EFAULT; } @@ -935,7 +935,7 @@ static int fsl_mx6_enable(struct platform_device *pdev) if (dev->clk_speed >= CLK_2048FS) { /* enable pll */ dev->clk_pll = devm_clk_get(&pdev->dev, "pll8_mlb"); - if (IS_ERR_OR_NULL(dev->clk_pll)) { + if (IS_ERR(dev->clk_pll)) { dev_err(&pdev->dev, "unable to get mlb pll clock\n"); clk_disable_unprepare(dev->clk); return -EFAULT; |
