Skip to contentSkip to conversation

Patch "i2c: i2c-stm32f7: fix no check on returned setup" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Apr 1, 2018

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

i2c: i2c-stm32f7: fix no check on returned setup

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     i2c-i2c-stm32f7-fix-no-check-on-returned-setup.patch

and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 771b7bf05339081019d22452ebcab6929372e13e Mon Sep 17 00:00:00 2001

From: Pierre-Yves MORDRET <[email protected]>
Date: Wed, 21 Mar 2018 17:48:40 +0100
Subject: i2c: i2c-stm32f7: fix no check on returned setup

From: Pierre-Yves MORDRET <[email protected]>

commit 771b7bf05339081019d22452ebcab6929372e13e upstream.

Before assigning returned setup structure check if not null

Fixes 463a9215f3ca7600b5ff ("i2c: stm32f7: fix setup structure")
---
 drivers/i2c/busses/i2c-stm32f7.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/i2c/busses/i2c-stm32f7.c +5 -0
@@ -887,6 +887,11 @@ static int stm32f7_i2c_probe(struct plat
 	}
 
 	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",

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/i2c-i2c-stm32f7-fix-no-check-on-returned-setup.patch