]> git.baikalelectronics.ru Git - kernel.git/commit
misc: bh1780: Introduce the use of devm_kzalloc
authorHimangi Saraogi <himangi774@gmail.com>
Wed, 23 Jul 2014 21:15:40 +0000 (02:45 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Jul 2014 18:10:42 +0000 (11:10 -0700)
commit77644634d53998243e470a7a87527470b74cea5a
treec97eba4fbc61dfd28f14399c8f4ca3ff4647139b
parentf277079219e2679f50908a560f5127483ae37ccb
misc: bh1780: Introduce the use of devm_kzalloc

This patch introduces the use of devm_kzalloc and does away with the
kfrees in the probe and remove functions. A label and the kfree
being called on the return path of failure on i2c_check_functionality,
which is completely unnecessary and removed. The NULL assignment of
ddata is no longer required is also done away with.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/bh1780gli.c