Patch "media: ov5670: Fix probe on ACPI" has been added to the 6.3-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    media: ov5670: Fix probe on ACPI

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-ov5670-fix-probe-on-acpi.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3425e1f7054845cf79fc2f5ee24e2466ec49b97d
Author: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Date:   Wed Mar 29 15:57:50 2023 +0100

    media: ov5670: Fix probe on ACPI
    
    [ Upstream commit 73b41dc51fbeffa4a216b20193274cfe92b5d95b ]
    
    devm_clk_get() will return either an error or NULL, which the driver
    handles, continuing to use the clock of reading the value of the
    clock-frequency property.
    
    However, the value of ov5670->xvclk is left as-is and the other clock
    framework functions aren't capable of handling error values.
    
    Use devm_clk_get_optional() to obtain NULL instead of -ENOENT.
    
    Fixes: 8004c91e2095 ("media: i2c: ov5670: Use common clock framework")
    Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
    Reviewed-by: Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c
index f79d908f4531b..c5e783a06f06c 100644
--- a/drivers/media/i2c/ov5670.c
+++ b/drivers/media/i2c/ov5670.c
@@ -2660,7 +2660,7 @@ static int ov5670_probe(struct i2c_client *client)
 		goto error_print;
 	}
 
-	ov5670->xvclk = devm_clk_get(&client->dev, NULL);
+	ov5670->xvclk = devm_clk_get_optional(&client->dev, NULL);
 	if (!IS_ERR_OR_NULL(ov5670->xvclk))
 		input_clk = clk_get_rate(ov5670->xvclk);
 	else if (PTR_ERR(ov5670->xvclk) == -ENOENT)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux