diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-30 07:14:35 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-30 07:14:35 -1000 |
commit | bd886137a10542b2c61270b187f5be58d8a05937 (patch) | |
tree | 7b4fef1d57652f98a7a9abc4b61a937c98c6ac8e /drivers | |
parent | ef82f598a01b497dd243ba20f704e29efffacb09 (diff) | |
parent | 771b7bf05339081019d22452ebcab6929372e13e (diff) | |
download | linux-bd886137a10542b2c61270b187f5be58d8a05937.tar.bz2 |
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fix from Wolfram Sang:
"A simple but worthwhile I2C driver fix for 4.16"
* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: i2c-stm32f7: fix no check on returned setup
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-stm32f7.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c index b445b3bb0bb1..f273e28c39db 100644 --- a/drivers/i2c/busses/i2c-stm32f7.c +++ b/drivers/i2c/busses/i2c-stm32f7.c @@ -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", |