mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
UPSTREAM: scsi: ufs: ufs-mediatek: Add put_device() after of_find_device_by_node()
This was found by coccicheck:
./drivers/scsi/ufs/ufs-mediatek.c, 211, 1-7, ERROR missing put_device;
call of_find_device_by_node on line 1185, but without a corresponding
object release within this function.
Link: https://lore.kernel.org/r/20211110105133.150171-1-ye.guojin@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cn>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bug: 234653003
(cherry picked from commit cc03facb1c)
Change-Id: Ib9c5d6d1ff3474a3f20b92cdd4693ff3fdc4f01c
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
9baf43edd7
commit
b7746819a9
@@ -1189,6 +1189,7 @@ static int ufs_mtk_probe(struct platform_device *pdev)
|
||||
}
|
||||
link = device_link_add(dev, &reset_pdev->dev,
|
||||
DL_FLAG_AUTOPROBE_CONSUMER);
|
||||
put_device(&reset_pdev->dev);
|
||||
if (!link) {
|
||||
dev_notice(dev, "add reset device_link fail\n");
|
||||
goto skip_reset;
|
||||
|
||||
Reference in New Issue
Block a user