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: NKarl Beldan <karl.beldan@gmail.com> Signed-off-by: NGreg Ungerer <gerg@uclinux.org> Signed-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录