staging: sb105x: fix potential NULL pointer dereference in mp_chars_in_buffer()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 29 Nov 2012 02:30:01 +0000 (21:30 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Nov 2012 02:15:27 +0000 (18:15 -0800)
commitb0ab02361167faa82198b783a8d555eb6f58901c
tree85e0f71610c6db1dc2fbcbe5cea2fb40332920b0
parent218cbbd82132d48c6f4e042e31beb6019f92db01
staging: sb105x: fix potential NULL pointer dereference in mp_chars_in_buffer()

The dereference to 'state' should be moved below the NULL test.

Cc: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sb105x/sb_pci_mp.c