]> git.baikalelectronics.ru Git - kernel.git/commit
wwan: core: require WWAN netdev setup callback existence
authorSergey Ryazanov <ryazanov.s.a@gmail.com>
Mon, 21 Jun 2021 22:50:53 +0000 (01:50 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jun 2021 17:01:16 +0000 (10:01 -0700)
commit205db6abe44846676d3173efa0b0d77aacf80aad
tree2325031d2022b27a69842311d8d661d92c5e9c78
parent4719e705ddc5d20bdbc5727cb089bc7b20822472
wwan: core: require WWAN netdev setup callback existence

The setup callback will be unconditionally passed to the
alloc_netdev_mqs(), where the NULL pointer dereference will cause the
kernel panic. So refuse to register WWAN netdev ops with warning
generation if the setup callback is not provided.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/wwan_core.c