All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "i2c: i2c-stm32f7: fix no check on returned setup" has been added to the 4.15-stable tree
@ 2018-04-01  8:55 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-04-01  8:55 UTC (permalink / raw)
  To: pierre-yves.mordret, alexandre.torgue, gregkh, wsa; +Cc: stable, stable-commits


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.15-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.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 771b7bf05339081019d22452ebcab6929372e13e Mon Sep 17 00:00:00 2001
From: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Date: Wed, 21 Mar 2018 17:48:40 +0100
Subject: i2c: i2c-stm32f7: fix no check on returned setup

From: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>

commit 771b7bf05339081019d22452ebcab6929372e13e upstream.

Before assigning returned setup structure check if not null

Fixes: 463a9215f3ca7600b5ff ("i2c: stm32f7: fix setup structure")
Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-stm32f7.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -888,6 +888,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 pierre-yves.mordret@st.com are

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-01  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-01  8:55 Patch "i2c: i2c-stm32f7: fix no check on returned setup" has been added to the 4.15-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.