diff --git a/drivers/mxc/amd-gpu/gsl_hal.c b/drivers/mxc/amd-gpu/gsl_hal.c index 85e91c27a80..0cb5b3651af 100644 --- a/drivers/mxc/amd-gpu/gsl_hal.c +++ b/drivers/mxc/amd-gpu/gsl_hal.c @@ -102,15 +102,12 @@ kgsl_hal_init(void) return GSL_FAILURE_ALREADYINITIALIZED; } - gsl_driver.hal = (void *)kmalloc(sizeof(gsl_hal_t), GFP_KERNEL); + gsl_driver.hal = (void *)kzalloc(sizeof(gsl_hal_t), GFP_KERNEL); if (!gsl_driver.hal) { return GSL_FAILURE_OUTOFMEM; } - memset(gsl_driver.hal, 0, sizeof(gsl_hal_t)); - - /* overlay structure on hal memory */ hal = (gsl_hal_t *) gsl_driver.hal;