]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7be4ac5fc9a721e9654bdde3259090765550fc07
treef78f9967a4109c2b9d751e84991ded81fb683f87
parentee8f163fb2e0fe532ea041409cb30f17601802cb
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