extcon: usbc-cros-ec: Use struct_size() helper in kzalloc()
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Showing
Please register or sign in to comment