net: hns: avoid null pointer dereference
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>
Thu, 19 May 2016 19:20:55 +0000 (21:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 May 2016 20:54:03 +0000 (13:54 -0700)
commit8da07a393f48864a87c61bb1dfbee640d9b97fd6
treef78f9967a4109c2b9d751e84991ded81fb683f87
parentc685293aa379b9d17e44fcc2f96a402b7648e838
net: hns: avoid null pointer dereference

In the statement
  assert(priv || priv->ae_handle);
the right side of || is only evaluated if priv is null.

v2:
As suggested by David Leight and David Miller the assert
statements are removed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c