Skip to content

Commit cc03fac

Browse files
Ye Guojinmartinkpetersen
authored andcommitted
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/[email protected] Reported-by: Zeal Robot <[email protected]> Reviewed-by: Peter Wang <[email protected]> Signed-off-by: Ye Guojin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 36e07d7 commit cc03fac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/scsi/ufs/ufs-mediatek.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,7 @@ static int ufs_mtk_probe(struct platform_device *pdev)
11891189
}
11901190
link = device_link_add(dev, &reset_pdev->dev,
11911191
DL_FLAG_AUTOPROBE_CONSUMER);
1192+
put_device(&reset_pdev->dev);
11921193
if (!link) {
11931194
dev_notice(dev, "add reset device_link fail\n");
11941195
goto skip_reset;

0 commit comments

Comments
 (0)