net: sockev: code cleanup

Replace with cleaner NULL checks. Needed for dependent change
commit 59f6fd5f1905 ("net: core: null pointer derefernce in
		sockev_client_cb").

Change-Id: Icdd7a5c9f3e3f343bb20b1f9b75fa580ea75a2dc
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
This commit is contained in:
Tejaswi Tanikella 2018-07-11 13:35:11 +05:30
parent 38a0bccad5
commit 31c5d9be72

View file

@ -74,7 +74,7 @@ static int sockev_client_cb(struct notifier_block *nb,
sock = (struct socket *)data;
if (socknlmsgsk == 0)
goto done;
if ((socknlmsgsk == NULL) || (sock == NULL) || (sock->sk == NULL))
if ((!socknlmsgsk) || (!sock) || (!sock->sk))
goto done;
if (sock->sk->sk_family != AF_INET && sock->sk->sk_family != AF_INET6)