Add a check for NULL on the alloc return. If devlink_alloc() fails and
we try to use devlink_priv() on the NULL return, the kernel gets very
unhappy and panics. With this fix, the driver load will still fail,
but at least it won't panic the kernel.
Fixes:
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| ionic.h | ||
| ionic_bus.h | ||
| ionic_bus_pci.c | ||
| ionic_debugfs.c | ||
| ionic_debugfs.h | ||
| ionic_dev.c | ||
| 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_lif.h | ||
| ionic_main.c | ||
| ionic_phc.c | ||
| ionic_regs.h | ||
| ionic_rx_filter.c | ||
| ionic_rx_filter.h | ||
| ionic_stats.c | ||
| ionic_stats.h | ||
| ionic_txrx.c | ||
| ionic_txrx.h | ||