Hi Sergei

> From: Vladimir Barinov <vladimir.bari...@cogentembedded.com>
> 
> Add VIN clocks and platform devices for R8A7779 SoC; add function to register
> the VIN platform devices.
> 
> Signed-off-by: Vladimir Barinov <vladimir.bari...@cogentembedded.com>
> [Sergei: renamed some variables]
> Signed-off-by: Sergei Shtylyov <sergei.shtyl...@cogentembedded.com>
(snip)
> +void __init r8a7779_add_vin_device(int id,
> +                                struct rcar_vin_platform_data *pdata)
> +{
> +     vin_info_table[id]->data = pdata;
> +     vin_info_table[id]->size_data = sizeof(struct rcar_vin_platform_data);
> +
> +     platform_device_register_full(vin_info_table[id]);
> +}

Can you add "id" check here ?

BUG_ON(id < 0 || id >= ARRAY_SIZE(vin_info_table));
or similar

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to