]> git.baikalelectronics.ru Git - kernel.git/commit
HID: hid-sensor-hub: use devm_ functions consistently
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 8 Feb 2014 23:11:00 +0000 (23:11 +0000)
committerJonathan Cameron <jic23@kernel.org>
Thu, 14 Aug 2014 17:28:30 +0000 (18:28 +0100)
commit5d92a93412a861eab5fa3ef180f4cda4a8fce710
treee82d5879d582affda153b5339308e9596df7383c
parenta29ea44a5ef0dd0444f89bd5e2e2a23f9d1e2587
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: Jonathan Cameron <jic23@kernel.org>
drivers/hid/hid-sensor-hub.c