]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dln2: Fix reference leak to master
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 9 Apr 2021 08:29:55 +0000 (08:29 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 9 Apr 2021 12:43:57 +0000 (13:43 +0100)
commitfbbbaccae7a3a53bbd4588447f322012abad4ccc
tree61fc35a3d02ad44b81f0f0ae3752023910dea973
parentf2bc1c722a61196a2d4551ec9fcca09d3526f4b3
spi: dln2: Fix reference leak to master

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/20210409082955.2907950-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dln2.c