Skip to contentSkip to conversation

scsi: ufs-mediatek: Add missing of_node_put() in ufs_mtk_probe()

PATCH Applied Zou Wei 3 participants 3 messages Jun 17, 2021 – Jun 19, 2021

Subsystems (2)
lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 scsi: ufs-mediatek: Add missing of_node_put() in ufs_mtk_probe()

The function is missing a of_node_put on node, fix this by adding the call before returning.

---
 drivers/scsi/ufs/ufs-mediatek.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/ufs/ufs-mediatek.c +1 -0
index 1a517c9..d2c2516 100644
@@ -1120,6 +1120,7 @@ static int ufs_mtk_probe(struct platform_device *pdev)
 	if (err)
 		dev_info(dev, "probe failed %d\n", err);
 
+	of_node_put(reset_node);
 	return err;
 }
 
Signature · 1 line
2.6.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Zou,

Quoted 14 lines · Zou Wei

The function is missing a of_node_put on node, fix this by adding the call before returning.

---
 drivers/scsi/ufs/ufs-mediatek.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/ufs/ufs-mediatek.c +0 -0
index 1a517c9..d2c2516 100644

drivers/scsi/ufs/ufs-mediatek.c static int ufs_mtk_probe(struct platform_device *pdev) · line 1126

Quoted 7 lines
drivers/scsi/ufs/ufs-mediatek.c +1 -0
@@ -1120,6 +1120,7 @@ static int ufs_mtk_probe(struct platform_device *pdev)
 	if (err)
 		dev_info(dev, "probe failed %d\n", err);
 
+	of_node_put(reset_node);
 	return err;
 }
 

Thanks for this fix.

#2 lore raw
In reply to Zou Wei

Zou,

Quoted 2 lines

The function is missing a of_node_put on node, fix this by adding the call before returning.

Applied to 5.14/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering