mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 02:58:45 +07:00
ionic: only save good lif dentry
Don't save the lif->dentry until we know we have
a good value.
Fixes: 1a58e19646
("ionic: Add basic lif support")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2530ba5af6
commit
0e1825f48c
@ -228,7 +228,13 @@ DEFINE_SHOW_ATTRIBUTE(netdev);
|
||||
|
||||
void ionic_debugfs_add_lif(struct ionic_lif *lif)
|
||||
{
|
||||
lif->dentry = debugfs_create_dir(lif->name, lif->ionic->dentry);
|
||||
struct dentry *lif_dentry;
|
||||
|
||||
lif_dentry = debugfs_create_dir(lif->name, lif->ionic->dentry);
|
||||
if (IS_ERR_OR_NULL(lif_dentry))
|
||||
return;
|
||||
lif->dentry = lif_dentry;
|
||||
|
||||
debugfs_create_file("netdev", 0400, lif->dentry,
|
||||
lif->netdev, &netdev_fops);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user