]> git.baikalelectronics.ru Git - kernel.git/commit
serial: pl011: protect attribute read from NULL platform data struct
authorLee Jones <lee.jones@linaro.org>
Thu, 9 May 2013 12:50:55 +0000 (13:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 May 2013 18:54:55 +0000 (11:54 -0700)
commit7d88c383562dbc4c9e847ad94e50b05a804785ee
tree99097803171b86bfdb778d8616cd3fe8f2a1b3f5
parent487b8216ded51beb545c20b6eef5dfa5eca475ff
serial: pl011: protect attribute read from NULL platform data struct

It's completely feasible that platform data will be empty i.e. when
booting with Device Tree with no device AUXDATA. So we must protect
it's use in these use-cases, or risk a kernel Oops.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c