wilc1000: Fix memleak in wilc_sdio_probe
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Thu, 20 Aug 2020 05:48:19 +0000 (13:48 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 27 Aug 2020 10:01:31 +0000 (13:01 +0300)
commit8d95ab34b21ee0f870a9185b6457e8f6eb54914c
tree4e687ae75fa5ca1def00b90234f7f9376c6fa1f3
parent621a3a8b1c0ecf16e1e5667ea5756a76a082b738
wilc1000: Fix memleak in wilc_sdio_probe

When devm_clk_get() returns -EPROBE_DEFER, sdio_priv
should be freed just like when wilc_cfg80211_init()
fails.

Fixes: 8692b047e86cf ("staging: wilc1000: look for rtc_clk clock")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200820054819.23365-1-dinghao.liu@zju.edu.cn
drivers/net/wireless/microchip/wilc1000/sdio.c