summaryrefslogtreecommitdiffstats
path: root/drivers/video/of_display_timing.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/of_display_timing.c')
-rw-r--r--drivers/video/of_display_timing.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 83b8963c9657..5244e93ceafc 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -181,8 +181,9 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
goto entryfail;
}
- disp->timings = kzalloc(sizeof(struct display_timing *) *
- disp->num_timings, GFP_KERNEL);
+ disp->timings = kcalloc(disp->num_timings,
+ sizeof(struct display_timing *),
+ GFP_KERNEL);
if (!disp->timings) {
pr_err("%pOF: could not allocate timings array\n", np);
goto entryfail;