staging: ks7010: do not dereference priv if priv is null
authorColin Ian King <colin.king@canonical.com>
Sat, 13 Aug 2016 18:52:38 +0000 (19:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2016 14:35:13 +0000 (16:35 +0200)
commit803394d03b43ba0ef4a9ed148de19c01d87cd13a
tree99a4c220b5a2fa54b9867e051f93aba23ecbd02d
parent6bef3f01398dc12532873f8b2376dba1339908bb
staging: ks7010: do not dereference priv if priv is null

priv is being dereferenced before a check for it being null
is made, so there is a possibililty a null pointer deference
can occur. Instead, only dereference priv if it is non-null.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks7010_sdio.c