diff options
| -rw-r--r-- | drivers/hwtracing/stm/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index 05386b76465e..657badb479a5 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c | |||
| @@ -674,7 +674,7 @@ static void stm_device_release(struct device *dev) | |||
| 674 | { | 674 | { |
| 675 | struct stm_device *stm = to_stm_device(dev); | 675 | struct stm_device *stm = to_stm_device(dev); |
| 676 | 676 | ||
| 677 | kfree(stm); | 677 | vfree(stm); |
| 678 | } | 678 | } |
| 679 | 679 | ||
| 680 | int stm_register_device(struct device *parent, struct stm_data *stm_data, | 680 | 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, | |||
| 691 | return -EINVAL; | 691 | return -EINVAL; |
| 692 | 692 | ||
| 693 | nmasters = stm_data->sw_end - stm_data->sw_start + 1; | 693 | nmasters = stm_data->sw_end - stm_data->sw_start + 1; |
| 694 | stm = kzalloc(sizeof(*stm) + nmasters * sizeof(void *), GFP_KERNEL); | 694 | stm = vzalloc(sizeof(*stm) + nmasters * sizeof(void *)); |
| 695 | if (!stm) | 695 | if (!stm) |
| 696 | return -ENOMEM; | 696 | return -ENOMEM; |
| 697 | 697 | ||
| @@ -744,7 +744,7 @@ err_device: | |||
| 744 | /* matches device_initialize() above */ | 744 | /* matches device_initialize() above */ |
| 745 | put_device(&stm->dev); | 745 | put_device(&stm->dev); |
| 746 | err_free: | 746 | err_free: |
| 747 | kfree(stm); | 747 | vfree(stm); |
| 748 | 748 | ||
| 749 | return err; | 749 | return err; |
| 750 | } | 750 | } |
