Re: [PATCH] pinctrl: berlin: Fix to avoid NULL pointer dereference

2019-03-18 Thread Jisheng Zhang
On Mon, 18 Mar 2019 18:31:29 -0500 Aditya Pakki wrote: > > > of_match_device can return a NULL value when the matching device is This could not happen. If the probe is called, it means OF registered a device with a valid compatible string, so match cannot be NULL. > not found. The patch avoids

[PATCH] pinctrl: berlin: Fix to avoid NULL pointer dereference

2019-03-18 Thread Aditya Pakki
of_match_device can return a NULL value when the matching device is not found. The patch avoids a potential dereference in such scenario. Signed-off-by: Aditya Pakki --- drivers/pinctrl/berlin/berlin-bg4ct.c | 3 +++ 1 file changed, 3 insertions(+) diff --git