Skip to content

Commit 9b63000

Browse files
x2018gregkh
authored andcommitted
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>
1 parent 7a6ee0b commit 9b63000

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,6 @@ struct vchiq_mmal_instance {
168168
/* ensure serialised access to service */
169169
struct mutex vchiq_mutex;
170170

171-
/* vmalloc page to receive scratch bulk xfers into */
172-
void *bulk_scratch;
173-
174171
struct idr context_map;
175172
/* protect accesses to context_map */
176173
struct mutex context_map_lock;
@@ -1847,8 +1844,6 @@ int vchiq_mmal_finalise(struct vchiq_mmal_instance *instance)
18471844
flush_workqueue(instance->bulk_wq);
18481845
destroy_workqueue(instance->bulk_wq);
18491846

1850-
vfree(instance->bulk_scratch);
1851-
18521847
idr_destroy(&instance->context_map);
18531848

18541849
kfree(instance);
@@ -1908,7 +1903,6 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)
19081903

19091904
mutex_init(&instance->vchiq_mutex);
19101905

1911-
instance->bulk_scratch = vmalloc(PAGE_SIZE);
19121906
instance->vchiq_instance = vchiq_instance;
19131907

19141908
mutex_init(&instance->context_map_lock);
@@ -1939,7 +1933,6 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)
19391933
vchiq_close_service(instance->service_handle);
19401934
destroy_workqueue(instance->bulk_wq);
19411935
err_free:
1942-
vfree(instance->bulk_scratch);
19431936
kfree(instance);
19441937
err_shutdown_vchiq:
19451938
vchiq_shutdown(vchiq_instance);

0 commit comments

Comments
 (0)