Re: [PATCH v4 12/13] i2c: qcom-geni: Store of_device_id data in driver private struct
From: Konrad Dybcio
Date: Tue Feb 03 2026 - 07:31:49 EST
On 2/2/26 7:09 PM, Praveen Talari wrote:
> To avoid repeatedly fetching and checking platform data across various
> functions, store the struct of_device_id data directly in the i2c
> private structure. This change enhances code maintainability and reduces
> redundancy.
>
> Acked-by: Viken Dadhaniya <viken.dadhaniya@xxxxxxxxxxxxxxxx>
> Signed-off-by: Praveen Talari <praveen.talari@xxxxxxxxxxxxxxxx>
> ---
[...]
>
> - desc = device_get_match_data(&pdev->dev);
> + gi2c->dev_data = device_get_match_data(&pdev->dev);
Because you dereference it unconditionally later, this should be
null-checked
Konrad