]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/ps3: Fix ps3-vuart null dereference
authorColin King <colin.king@canonical.com>
Mon, 14 Sep 2015 19:35:04 +0000 (19:35 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 29 Sep 2015 13:00:58 +0000 (23:00 +1000)
commita33fad95e5633c572c7eadaefa085d40419bd2ad
tree920798384dd3dad9f03bd9094595784b1dd1b907
parent46f7bfbcaa4412c36e3e5eb7b27134c6810b9b72
drivers/ps3: Fix ps3-vuart null dereference

On the unlikely event that drv is null, the current code will
perform a null pointer dereference with it when printing a dev_dbg
message.  Instead, the BUG_ON check on drv should be performed
before we emit the dev_dbg message.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/ps3/ps3-vuart.c