diff options
author | Hao Chen | 2022-03-26 17:51:04 +0800 |
---|---|---|
committer | David S. Miller | 2022-03-26 09:16:49 -0700 |
commit | 4d07c5936c2508ddd1cfd49b0a91d94cb4d1f0e8 (patch) | |
tree | ec72f2be77641f93370cd8734435ca8758a693c9 /init/do_mounts.h | |
parent | f5cd60169f981ca737c9e49c446506dfafc90a35 (diff) |
net: hns3: add NULL pointer check for hns3_set/get_ringparam()
When pci devices init failed and haven't reinit, priv->ring is
NULL and hns3_set/get_ringparam() will access priv->ring. it
causes call trace.
So, add NULL pointer check for hns3_set/get_ringparam() to
avoid this situation.
Fixes: 5668abda0931 ("net: hns3: add support for set_ringparam")
Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'init/do_mounts.h')
0 files changed, 0 insertions, 0 deletions