Re: [PATCH] Pinctrl: mvebu - Fix possible NULL derefrence.

From: Thomas Petazzoni
Date: Mon Jan 30 2017 - 03:32:19 EST


Hello,

On Mon, 30 Jan 2017 10:21:43 +0530, Shailendra Verma wrote:
> of_match_device could return NULL, and so can cause a NULL
> pointer dereference later.
>
> Signed-off-by: Shailendra Verma <shailendra.v@xxxxxxxxxxx>

In practice, I don't see how of_match_device() can return NULL here.
Indeed, those drivers only support Device Tree based probing, so
of_match_device() will always return a non-NULL value.

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com