Hi Hans, On Sat, 29 Jun 2019, Hans Verkuil wrote:
sd->entity.graph_obj.mdev can be NULL when this function is called, and that breaks existing drivers (rcar-vin, but probably others as well). Check if sd->entity.num_pads is non-zero instead since that doesn't depend on mdev. Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> Reported-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> Fixes: a8fa55078a77 ("media: v4l2-subdev: Verify arguments in v4l2_subdev_call()") Tested-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
Thanks, this fixes the following boot regression on r8a7791/koelsch: -rcar-vin e6ef0000.video: Device registered as video27 +rcar-vin e6ef0000.video: Unsupported media bus format for adv7612 13-004c +rcar-vin e6ef0000.video: Notifier registration failed +rcar-vin: probe of e6ef0000.video failed with error -22 Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds