linux/drivers/net/ethernet/pensando/ionic
Yuan Can 280c0f7cd0 net: ionic: Fix error handling in ionic_init_module()
A problem about ionic create debugfs failed is triggered with the
following log given:

 [  415.799514] debugfs: Directory 'ionic' with parent '/' already present!

The reason is that ionic_init_module() returns ionic_bus_register_driver()
directly without checking its return value, if ionic_bus_register_driver()
failed, it returns without destroy the newly created debugfs, resulting
the debugfs of ionic can never be created later.

 ionic_init_module()
   ionic_debugfs_create() # create debugfs directory
   ionic_bus_register_driver()
     pci_register_driver()
       driver_register()
         bus_add_driver()
           priv = kzalloc(...) # OOM happened
   # return without destroy debugfs directory

Fix by removing debugfs when ionic_bus_register_driver() returns error.

Fixes: fbfb803153 ("ionic: Add hardware init and device commands")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Acked-by: Shannon Nelson <snelson@pensando.io>
Link: https://lore.kernel.org/r/20221113092929.19161-1-yuancan@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-11-14 18:50:53 -08:00
..
ionic.h
ionic_bus.h
ionic_bus_pci.c ionic: change order of devlink port register and netdev register 2022-09-27 07:54:45 -07:00
ionic_debugfs.c
ionic_debugfs.h
ionic_dev.c ionic: no transition while stopping 2022-02-28 11:42:45 +00:00
ionic_dev.h
ionic_devlink.c
ionic_devlink.h
ionic_ethtool.c
ionic_ethtool.h
ionic_fw.c
ionic_if.h
ionic_lif.c ionic: catch NULL pointer issue on reconfig 2022-10-18 19:19:31 -07:00
ionic_lif.h
ionic_main.c net: ionic: Fix error handling in ionic_init_module() 2022-11-14 18:50:53 -08:00
ionic_phc.c
ionic_regs.h
ionic_rx_filter.c
ionic_rx_filter.h
ionic_stats.c
ionic_stats.h
ionic_txrx.c net: add skb_[inner_]tcp_all_headers helpers 2022-07-02 16:22:25 +01:00
ionic_txrx.h
Makefile