mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
26 lines
894 B
Diff
26 lines
894 B
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/1085] 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(-)
|
||
|
|
||
|
--- a/drivers/media/i2c/ov64a40.c
|
||
|
+++ b/drivers/media/i2c/ov64a40.c
|
||
|
@@ -3555,7 +3555,7 @@ static int ov64a40_probe(struct i2c_clie
|
||
|
}
|
||
|
|
||
|
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");
|
||
|
|