]> git.karo-electronics.de Git - linux-beck.git/commit
staging/sep: Check pointers before dereferencing (fix smatch warning)
authorPeter Huewe <peterhuewe@gmx.de>
Tue, 19 Feb 2013 12:07:28 +0000 (13:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Mar 2013 16:15:32 +0000 (09:15 -0700)
commiteb1bd49c50880df667905b4cfb472064f62c05d1
treebbac4621c3d1c03046feefb0ab065ef6404e63dc
parentc37aeab62514cd623afa1b952ca86d53dd21a745
staging/sep: Check pointers before dereferencing (fix smatch warning)

smatch complains about two dereferenced before check issues:

sep_main.c:2898 sep_free_dma_tables_and_dcb() warn: variable dereferenced before check
'dma_ctx' (see line 2885)
sep_main.c:2898 sep_free_dma_tables_and_dcb() warn: variable dereferenced before check
'*dma_ctx' (see line 2885)

-> Move the checks to the top, but keep the semantics.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sep/sep_main.c