spi: omap-100k: Fix reference leak to master
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 9 Apr 2021 08:29:54 +0000 (08:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:20 +0000 (14:47 +0200)
commit75e2b46211374fc2d254babe6f41bda6bfc7a1f9
tree40bc79b3ca22d62554cb0e98be00b9701654ad33
parent517e99f228424c33c319747106bfa60623a9e1f1
spi: omap-100k: Fix reference leak to master

[ Upstream commit a23faea76d4cf5f75decb574491e66f9ecd707e7 ]

Call spi_master_get() holds the reference count to master device, thus
we need an additional spi_master_put() call to reduce the reference
count, otherwise we will leak a reference to master.

This commit fix it by removing the unnecessary spi_master_get().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210409082954.2906933-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-omap-100k.c