OSDN Git Service

staging: sm750fb: Replace kzalloc with devm_kzalloc
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Sun, 28 Feb 2016 15:51:53 +0000 (21:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commit677c50721181b0375a763941ce188997588b1ace
tree2efd76dc3e14b3016458af471c0454a8871e0409
parentfad2564eaa350368d95be2b7f0c832541dc9d09a
staging: sm750fb: Replace kzalloc with devm_kzalloc

Devm_ functions allocate memory that is released when a driver
detaches.
Replace kzalloc with devm_kzalloc and remove corresponding
kfrees from probe and remove functions of a pci_dev.

Also, an unnecessary label has been removed by replacing it
with a direct return statement.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c