diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2020-11-17 22:23:05 +0100 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2020-11-17 22:23:05 +0100 |
| commit | ad9a72f9c6fd3998f0080701f1cc1f43a4317b7c (patch) | |
| tree | dd53a560a1523f5dcd9823b29ae92bdcc0b7da4d /net/can/proc.c | |
| parent | b9bf97105f4b9adc32604d24072147b242564fb3 (diff) | |
| parent | 09162bc32c880a791c6c0668ce0745cf7958f576 (diff) | |
Merge tag 'v5.10-rc4' into devel
Linux 5.10-rc4
Diffstat (limited to 'net/can/proc.c')
| -rw-r--r-- | net/can/proc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/can/proc.c b/net/can/proc.c index 550928b8b8a2..5ea8695f507e 100644 --- a/net/can/proc.c +++ b/net/can/proc.c @@ -462,6 +462,9 @@ void can_init_proc(struct net *net) */ void can_remove_proc(struct net *net) { + if (!net->can.proc_dir) + return; + if (net->can.pde_stats) remove_proc_entry(CAN_PROC_STATS, net->can.proc_dir); @@ -486,6 +489,5 @@ void can_remove_proc(struct net *net) if (net->can.pde_rcvlist_sff) remove_proc_entry(CAN_PROC_RCVLIST_SFF, net->can.proc_dir); - if (net->can.proc_dir) - remove_proc_entry("can", net->proc_net); + remove_proc_entry("can", net->proc_net); } |
