Since commit: 86d37bf31af6 ("media: i2c: max9286: Allocate v4l2_async_subdev dynamically") the async subdevice registered to the max9286 notifier is dynamically allocated by the v4l2 framework by using the v4l2_async_notifier_add_fwnode_subdev function. In order to allocate enough space for max9286_asd structure that encloses the async subdevice paired with a pointer to the corresponding source, pass to the framework the size of the whole structure in place of the one of the enclosed async subdev. Fixes: 86d37bf31af6 ("media: i2c: max9286: Allocate v4l2_async_subdev dynamically") Signed-off-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx> --- drivers/media/i2c/max9286.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index c82c1493e099..746c411b79a0 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -579,8 +579,7 @@ static int max9286_v4l2_notifier_register(struct max9286_priv *priv) struct v4l2_async_subdev *asd; asd = v4l2_async_notifier_add_fwnode_subdev(&priv->notifier, - source->fwnode, - sizeof(*asd)); + source->fwnode, sizeof(struct max9286_asd)); if (IS_ERR(asd)) { dev_err(dev, "Failed to add subdev for source %u: %ld", i, PTR_ERR(asd)); -- 2.28.0