Skip to content
Commit a7ad53cb authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Pavel Machek
Browse files

leds: ns2: Use struct_size() in devm_kzalloc()



Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes. Also, remove unnecessary
function sizeof_ns2_led_priv().

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent c4e94413
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment