Patch "media: ov2680: Clear the 'ret' variable on success" has been added to the 6.9-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: ov2680: Clear the 'ret' variable on success

to the 6.9-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-ov2680-clear-the-ret-variable-on-success.patch
and it can be found in the queue-6.9 subdirectory.

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



commit 7276613f092218c18b5b865d0b6bf9cae8c99395
Author: Fabio Estevam <festevam@xxxxxxx>
Date:   Thu Mar 28 19:44:12 2024 -0300

    media: ov2680: Clear the 'ret' variable on success
    
    [ Upstream commit 49a9bad83b4ab5dac1d7aba2615c77978bcf3984 ]
    
    Since commit 63b0cd30b78e ("media: ov2680: Add bus-cfg / endpoint
    property verification") even when the correct 'link-frequencies'
    property is passed in the devicetree, the driver fails to probe:
    
    ov2680 1-0036: probe with driver ov2680 failed with error -22
    
    The reason is that the variable 'ret' may contain the -EINVAL value
    from a previous assignment:
    
    ret = fwnode_property_read_u32(dev_fwnode(dev), "clock-frequency",
                                   &rate);
    
    Fix the problem by clearing 'ret' on the successful path.
    
    Tested on imx7s-warp board with the following devicetree:
    
    port {
            ov2680_to_mipi: endpoint {
                    remote-endpoint = <&mipi_from_sensor>;
                    clock-lanes = <0>;
                    data-lanes = <1>;
                    link-frequencies = /bits/ 64 <330000000>;
            };
    };
    
    Cc: stable@xxxxxxxxxxxxxxx
    Fixes: 63b0cd30b78e ("media: ov2680: Add bus-cfg / endpoint property verification")
    Suggested-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Fabio Estevam <festevam@xxxxxxx>
    Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Stable-dep-of: 24034af644fc ("media: ov2680: Do not fail if data-lanes property is absent")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c
index 39d321e2b7f98..3e3b7c2b492cf 100644
--- a/drivers/media/i2c/ov2680.c
+++ b/drivers/media/i2c/ov2680.c
@@ -1135,6 +1135,7 @@ static int ov2680_parse_dt(struct ov2680_dev *sensor)
 		goto out_free_bus_cfg;
 	}
 
+	ret = 0;
 out_free_bus_cfg:
 	v4l2_fwnode_endpoint_free(&bus_cfg);
 	return ret;




[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