]> git.baikalelectronics.ru Git - kernel.git/commit
HID: hid-sensor-hub: use devm_ functions consistently
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 2 Aug 2014 22:11:35 +0000 (03:41 +0530)
committerJiri Kosina <jkosina@suse.cz>
Tue, 12 Aug 2014 14:27:22 +0000 (16:27 +0200)
commit6ec397ff45cb34b74a63c36aae6682878ee18c40
tree9d73748ec2f32c80f9caa0b1e2ec9371dfe50bff
parentdacb6097114c2cd5996bafadbe1cc78be9da2883
HID: hid-sensor-hub: use devm_ functions consistently

Use devm_kzalloc for all calls to kzalloc and not just the first.  Use
devm functions for other allocations as well. The calls to free the
allocated memory in the probe and remove functions are done away with
and a label is removed in the probe function.

The semantic match that finds the inconsistency is as follows:

// <smpl>
@@
@@

*devm_kzalloc(...)
...
*kzalloc(...)
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sensor-hub.c