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-23 15:11:12 -07:00
2022-03-23 14:35:59 -07:00
2022-03-22 17:03:12 -07:00
2022-03-23 18:23:13 -07:00
2022-02-02 07:49:59 -07:00
2022-03-23 18:23:13 -07:00
2022-03-23 18:23:13 -07:00
2022-03-23 18:03:08 -07:00
2022-03-18 18:46:15 +01:00
2022-03-23 18:23:13 -07:00
2022-03-24 12:35:59 -07:00
2022-03-22 18:26:56 -07:00
2022-03-21 10:55:18 -07:00
2022-03-23 18:23:13 -07:00
2022-03-21 18:33:57 -07:00
2022-03-23 18:03:08 -07:00
2022-03-24 12:30:37 -07:00
2022-03-21 18:33:57 -07:00
2022-03-21 18:33:57 -07:00
2022-03-24 13:13:26 -07:00
2022-03-23 14:51:35 -07:00
2022-03-23 14:51:35 -07:00
2022-03-23 18:03:08 -07:00
2022-03-21 17:16:01 -07:00
2022-03-23 14:51:35 -07:00
2022-03-23 18:23:13 -07:00
2022-03-21 18:33:57 -07:00
2022-03-24 13:13:26 -07:00
2022-03-23 14:39:51 -07:00
2022-03-21 18:33:57 -07:00
2022-03-21 18:33:57 -07:00
2022-01-22 08:33:37 +02:00
2022-03-22 17:03:12 -07:00
2022-03-22 17:03:12 -07:00
2022-03-24 12:35:59 -07:00
2022-03-23 18:37:22 -07:00
2022-03-23 15:11:12 -07:00
2022-03-21 14:46:01 -07:00
2022-03-21 18:27:05 -07:00
2022-01-27 11:23:26 +02:00
2022-03-24 13:13:26 -07:00
2022-03-24 13:13:26 -07:00
2022-03-21 18:33:57 -07:00
2022-03-24 13:13:26 -07:00
2022-03-23 18:23:13 -07:00
2022-03-18 19:00:26 +01:00
2022-03-23 14:51:35 -07:00
2022-03-23 18:03:08 -07:00
2022-01-22 08:33:37 +02:00