mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
30 lines
1 KiB
Diff
30 lines
1 KiB
Diff
From 3eadbb7806945ea433cf62867bccfadac3fdb201 Mon Sep 17 00:00:00 2001
|
|
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
|
Date: Thu, 29 Feb 2024 09:38:15 +0100
|
|
Subject: [PATCH 0921/1002] media: ov64a40: Better check for error on clk_get()
|
|
|
|
The clk_get() function returns "a valid IS_ERR() condition with
|
|
corresponding errno". Use the IS_ERR() macro insted of just checking
|
|
for the pointer not being NULL.
|
|
|
|
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
|
---
|
|
drivers/media/i2c/ov64a40.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/media/i2c/ov64a40.c b/drivers/media/i2c/ov64a40.c
|
|
index 5c70d4e5dd3b..ca4fc644cc26 100644
|
|
--- a/drivers/media/i2c/ov64a40.c
|
|
+++ b/drivers/media/i2c/ov64a40.c
|
|
@@ -3555,7 +3555,7 @@ static int ov64a40_probe(struct i2c_client *client)
|
|
}
|
|
|
|
ov64a40->xclk = devm_clk_get(&client->dev, NULL);
|
|
- if (!ov64a40->xclk)
|
|
+ if (IS_ERR(ov64a40->xclk))
|
|
return dev_err_probe(&client->dev, PTR_ERR(ov64a40->xclk),
|
|
"Failed to get clock\n");
|
|
|
|
--
|
|
2.44.0
|
|
|