]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: adv748x: Zero entire struct v4l2_fwnode_endpoint
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 30 Sep 2020 11:49:15 +0000 (13:49 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:13 +0000 (10:31 +0100)
The v4l2_fwnode_parse_endpoint() function can make use of defaults in
multiple bus types. To use this feature, all callers must zero the rest of
the fields of this struct, too. All other drivers appear to do that
already apart from this one.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/adv748x/adv748x-core.c

index 1fe7f97c6d52cd976f5dcb6408f5279eb8ef97c4..ae8b7ebf3830aa1c9d406d4fd44d5c07e184d846 100644 (file)
@@ -589,14 +589,13 @@ static int adv748x_parse_csi2_lanes(struct adv748x_state *state,
                                    unsigned int port,
                                    struct device_node *ep)
 {
-       struct v4l2_fwnode_endpoint vep;
+       struct v4l2_fwnode_endpoint vep = { .bus_type = V4L2_MBUS_CSI2_DPHY };
        unsigned int num_lanes;
        int ret;
 
        if (port != ADV748X_PORT_TXA && port != ADV748X_PORT_TXB)
                return 0;
 
-       vep.bus_type = V4L2_MBUS_CSI2_DPHY;
        ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &vep);
        if (ret)
                return ret;