Commit fbd4665a authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: af_can: can_pernet_init(): Use preferred style kzalloc(sizeof()) usage

This patch switches can_pernet_init() to the preferred style of using
the sizeof() operator in kzalloc().
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 1cf571eb
No related merge requests found
...@@ -834,13 +834,13 @@ static int can_pernet_init(struct net *net) ...@@ -834,13 +834,13 @@ static int can_pernet_init(struct net *net)
{ {
spin_lock_init(&net->can.can_rcvlists_lock); spin_lock_init(&net->can.can_rcvlists_lock);
net->can.can_rx_alldev_list = net->can.can_rx_alldev_list =
kzalloc(sizeof(struct can_dev_rcv_lists), GFP_KERNEL); kzalloc(sizeof(*net->can.can_rx_alldev_list), GFP_KERNEL);
if (!net->can.can_rx_alldev_list) if (!net->can.can_rx_alldev_list)
goto out; goto out;
net->can.can_stats = kzalloc(sizeof(struct s_stats), GFP_KERNEL); net->can.can_stats = kzalloc(sizeof(*net->can.can_stats), GFP_KERNEL);
if (!net->can.can_stats) if (!net->can.can_stats)
goto out_free_alldev_list; goto out_free_alldev_list;
net->can.can_pstats = kzalloc(sizeof(struct s_pstats), GFP_KERNEL); net->can.can_pstats = kzalloc(sizeof(*net->can.can_pstats), GFP_KERNEL);
if (!net->can.can_pstats) if (!net->can.can_pstats)
goto out_free_can_stats; goto out_free_can_stats;
......
Markdown is supported
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