amd-gpu: use kzalloc instead of kmalloc/memset

This commit is contained in:
Matt Sealey
2012-12-10 20:43:42 -06:00
parent 4c741b2e31
commit 63f040b7ad

View File

@@ -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;