Skip to content
Commit c28b3bff authored by Ziyang Xuan's avatar Ziyang Xuan Committed by Marc Kleine-Budde
Browse files

can: raw: process optimization in raw_init()



Now, register notifier after register proto successfully. It can create
raw socket and set socket options once register proto successfully, so it
is possible missing notifier event before register notifier successfully
although this is a low probability scenario.

Move notifier registration to the front of proto registration like done
in j1939. In addition, register_netdevice_notifier() may fail, check its
result is necessary.

Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Link: https://lore.kernel.org/all/7af9401f0d2d9fed36c1667b5ac9b8df8f8b87ee.1661584485.git.william.xuanziyang@huawei.com


Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 318d8235
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment