diff options
author | Xiaoke Wang <xkernel.wang@foxmail.com> | 2022-03-16 01:24:12 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-18 13:42:26 +0100 |
commit | 9b63000010a0ec3196bd6ecac5b828ba6e6b65dd (patch) | |
tree | c4ba2faa1d82bdd06b43d3cebc789d800c3f0d7a /drivers/staging | |
parent | 7a6ee0bbab2551d7189ce0f5e625fef4d612ebea (diff) |
staging: mmal-vchiq: clear redundant item named bulk_scratch
bulk_scratch is not used anywhere and the original allocation of it
does not have proper check.
Deleting it directly seems to be a good choice.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Link: https://lore.kernel.org/r/tencent_F721901366AB5C720E008AF7F02DA5D3FF07@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c index cb6cdbfaf6ec..70c9d5544b56 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c @@ -168,9 +168,6 @@ struct vchiq_mmal_instance { /* ensure serialised access to service */ struct mutex vchiq_mutex; - /* vmalloc page to receive scratch bulk xfers into */ - void *bulk_scratch; - struct idr context_map; /* protect accesses to context_map */ struct mutex context_map_lock; @@ -1847,8 +1844,6 @@ int vchiq_mmal_finalise(struct vchiq_mmal_instance *instance) flush_workqueue(instance->bulk_wq); destroy_workqueue(instance->bulk_wq); - vfree(instance->bulk_scratch); - idr_destroy(&instance->context_map); kfree(instance); @@ -1908,7 +1903,6 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance) mutex_init(&instance->vchiq_mutex); - instance->bulk_scratch = vmalloc(PAGE_SIZE); instance->vchiq_instance = vchiq_instance; mutex_init(&instance->context_map_lock); @@ -1939,7 +1933,6 @@ err_close_services: vchiq_close_service(instance->service_handle); destroy_workqueue(instance->bulk_wq); err_free: - vfree(instance->bulk_scratch); kfree(instance); err_shutdown_vchiq: vchiq_shutdown(vchiq_instance); |