pata_octeon_cf: use devm_kzalloc() to allocate cf_port
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 14 Apr 2014 16:28:37 +0000 (18:28 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 14 Apr 2014 17:33:28 +0000 (13:33 -0400)
commit7a56c0ba266844d7b1964694c47eff2199986e83
tree41db43f9c8f5e0c32b299645ffd77d1e46a49895
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5
pata_octeon_cf: use devm_kzalloc() to allocate cf_port

As a nice side effect this fixes the cf_port leak on
dma_coerce_mask_and_coherent() or ata_host_activate()
failure.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Daney <david.daney@cavium.com>
Suggested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/pata_octeon_cf.c