From: Greg Ungerer Date: Tue, 21 Oct 2014 05:57:48 +0000 (+1000) Subject: spi: orion: fix potential NULL pointer de-reference X-Git-Tag: omap-for-v3.19/fixes-not-urgent-part1~50^2^3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a2d3635524fe80d9e23623b2fe4a2113045f8d8;p=pandora-kernel.git spi: orion: fix potential NULL pointer de-reference It's possible that the call to of_match_device() (introduced in commit df59fa7f ["spi: orion: support armada extended baud rates"]) may return a NULL if there is no match in the device tree (or perhaps no device tree at all). Check the return pointer and set the local device data to the lowest common denominator orion device data if it is NULL. Reported-by: Karl Beldan Signed-off-by: Greg Ungerer Signed-off-by: Mark Brown --- Reading git-diff-tree failed