mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
i2c: i2c-stm32f7: fix no check on returned setup
Before assigning returned setup structure check if not null
Fixes: 463a9215f3 ("i2c: stm32f7: fix setup structure")
Signed-off-by: Pierre-Yves MORDRET <[email protected]>
Acked-by: Alexandre TORGUE <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Cc: [email protected]
This commit is contained in:
parent
c698ca5278
commit
771b7bf053
1 changed files with 5 additions and 0 deletions
|
|
@ -888,6 +888,11 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
setup = of_device_get_match_data(&pdev->dev);
|
||||
if (!setup) {
|
||||
dev_err(&pdev->dev, "Can't get device data\n");
|
||||
ret = -ENODEV;
|
||||
goto clk_free;
|
||||
}
|
||||
i2c_dev->setup = *setup;
|
||||
|
||||
ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-rising-time-ns",
|
||||
|
|
|
|||
Loading…
Reference in a new issue