commit | cf1a1a6a7d81d73bcb5568b23572d6fd593add87 | [log] [tgz] |
---|---|---|
author | Gustavo A. R. Silva <gustavoars@kernel.org> | Fri Jun 19 17:14:03 2020 -0500 |
committer | Pavel Machek <pavel@ucw.cz> | Sun Jul 12 10:28:01 2020 +0200 |
tree | ae676ad71662219e5e86ff5b1e5f64962084adba | |
parent | a7ad53cb6687069024efbd3af734c7811f63d2a5 [diff] |
leds: gpio: 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_gpio_leds_priv(). This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>