Re: [PATCH 3/3] pinctrl: tegra-xusb: Check that of_match_node returns a valid pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 19, 2015 at 03:14:23PM +0100, Jon Hunter wrote:
> of_match_node() will return NULL if no match is found and so check for
> this before dereferencing the pointer.
> 
> Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>
> ---
>  drivers/pinctrl/pinctrl-tegra-xusb.c | 3 +++
>  1 file changed, 3 insertions(+)

This isn't necessary. The driver is probed from DT only and therefore
.probe() will only be called if there's a matching entry in the OF
device ID table. match can never be NULL.

Thierry

Attachment: pgpC1JCvh5elp.pgp
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux