spi: dw: Don't call kfree for memory allocated by devm_kzalloc
authorAxel Lin <[email protected]>
Tue, 25 Mar 2014 04:44:13 +0000 (12:44 +0800)
committerMark Brown <[email protected]>
Fri, 28 Mar 2014 11:48:55 +0000 (11:48 +0000)
commitc63f5da00845143de621e991ea186be0829647ee
tree6f5095de47a8364eb5e2b27093746f28fe503bef
parent765ee709eb40abf0c43c6d864ac6f01677b7fd5a
spi: dw: Don't call kfree for memory allocated by devm_kzalloc

With devm_kzalloc, the memory is automatically freed when spi_device detach from
the bus.

Fixes: commit 43f627ac9de42 (spi: dw: fix memory leak on error path)
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Baruch Siach <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
drivers/spi/spi-dw.c