Zheng Yongjun 0906f3a3df net: sparx5: switchdev: fix possible NULL pointer dereference
As the possible failure of the allocation, devm_kzalloc() may return NULL
pointer.
Therefore, it should be better to check the 'db' in order to prevent
the dereference of NULL pointer.

Fixes: 10615907e9b51 ("net: sparx5: switchdev: adding frame DMA functionality")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-03-26 11:49:09 -07:00
..
2022-03-04 12:02:19 +00:00
2022-03-21 18:33:57 -07:00
2022-03-21 18:33:57 -07:00
2022-03-06 11:05:31 +00:00
2022-03-06 11:05:31 +00:00
2022-03-06 11:05:31 +00:00
2022-03-24 13:13:26 -07:00
2022-03-16 08:47:02 -07:00
2022-03-01 08:38:01 +00:00
2022-03-17 20:33:52 +01:00