spi: spi-zynqmp-gqspi: Fix runtime PM imbalance in zynqmp_qspi_probe
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Thu, 15 Apr 2021 07:46:44 +0000 (15:46 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 15 Apr 2021 15:07:59 +0000 (16:07 +0100)
commit58eaa7b2d07d3c25e1068b0bf42ca7e7464f4bca
tree021b5df6c350dd2a8e9acd81b4e58e70cda46d39
parentd6371415517700ae225dd1aaa8a35a86a659ada6
spi: spi-zynqmp-gqspi: Fix runtime PM imbalance in zynqmp_qspi_probe

There is a PM usage counter decrement after zynqmp_qspi_init_hw()
without any refcount increment, which leads to refcount leak.Add
a refcount increment to balance the refcount. Also set
auto_runtime_pm to resume suspended spi controller.

Fixes: 9e3a000362aec ("spi: zynqmp: Add pm runtime support")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Tested-by: Quanyang Wang <quanyang.wang@windriver.com>
Link: https://lore.kernel.org/r/20210415074644.24646-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-zynqmp-gqspi.c