treewide: Replace more open-coded allocation size multiplications
As done treewide earlier, this catches several more open-coded allocation size calculations that were added to the kernel during the merge window. This performs the following mechanical transformations using Coccinelle: kvmalloc(a * b, ...) -> kvmalloc_array(a, b, ...) kvzalloc(a * b, ...) -> kvcalloc(a, b, ...) devm_kzalloc(..., a * b, ...) -> devm_kcalloc(..., a, b, ...) Signed-off-by: Kees Cook <keescook@chromium.org>
Tento commit je obsažen v:
@@ -600,7 +600,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
|
||||
}
|
||||
|
||||
mtk_crtc->layer_nr = mtk_ddp_comp_layer_nr(mtk_crtc->ddp_comp[0]);
|
||||
mtk_crtc->planes = devm_kzalloc(dev, mtk_crtc->layer_nr *
|
||||
mtk_crtc->planes = devm_kcalloc(dev, mtk_crtc->layer_nr,
|
||||
sizeof(struct drm_plane),
|
||||
GFP_KERNEL);
|
||||
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele