[PATCH 1/1] media: i2c: ov5670: Fix conditions for clock access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Leftovers from the earlier fix. Fix also the conditions for reading the
clock-frequency property as well as accessing the clock.

Fixes: 8df08ba4a331 ("media: ov5670: Fix probe on ACPI")
Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
 drivers/media/i2c/ov5670.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c
index c5e783a06f06c..5437cf32a7b3a 100644
--- a/drivers/media/i2c/ov5670.c
+++ b/drivers/media/i2c/ov5670.c
@@ -2661,9 +2661,9 @@ static int ov5670_probe(struct i2c_client *client)
 	}
 
 	ov5670->xvclk = devm_clk_get_optional(&client->dev, NULL);
-	if (!IS_ERR_OR_NULL(ov5670->xvclk))
+	if (!IS_ERR(ov5670->xvclk))
 		input_clk = clk_get_rate(ov5670->xvclk);
-	else if (PTR_ERR(ov5670->xvclk) == -ENOENT)
+	else if (!ov5670->xvclk)
 		device_property_read_u32(&client->dev, "clock-frequency",
 					 &input_clk);
 	else
-- 
2.30.2




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux