|
@@ -674,7 +674,7 @@ static void stm_device_release(struct device *dev)
|
|
|
{
|
|
|
struct stm_device *stm = to_stm_device(dev);
|
|
|
|
|
|
- kfree(stm);
|
|
|
+ vfree(stm);
|
|
|
}
|
|
|
|
|
|
int stm_register_device(struct device *parent, struct stm_data *stm_data,
|
|
@@ -691,7 +691,7 @@ int stm_register_device(struct device *parent, struct stm_data *stm_data,
|
|
|
return -EINVAL;
|
|
|
|
|
|
nmasters = stm_data->sw_end - stm_data->sw_start + 1;
|
|
|
- stm = kzalloc(sizeof(*stm) + nmasters * sizeof(void *), GFP_KERNEL);
|
|
|
+ stm = vzalloc(sizeof(*stm) + nmasters * sizeof(void *));
|
|
|
if (!stm)
|
|
|
return -ENOMEM;
|
|
|
|
|
@@ -744,7 +744,7 @@ err_device:
|
|
|
/* matches device_initialize() above */
|
|
|
put_device(&stm->dev);
|
|
|
err_free:
|
|
|
- kfree(stm);
|
|
|
+ vfree(stm);
|
|
|
|
|
|
return err;
|
|
|
}
|