Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fsi: master-ast-cf: Fix missing of_node_put in fsi_master_acf_probe

of_parse_phandle returns node pointer with refcount incremented, use
of_node_put() on it when done.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Link: https://lore.kernel.org/r/20220407085911.2491719-1-lv.ruyi@zte.com.cn
Signed-off-by: Joel Stanley <joel@jms.id.au>

authored by

Lv Ruyi and committed by
Joel Stanley
182d98e0 b1534a05

+2
+2
drivers/fsi/fsi-master-ast-cf.c
··· 1324 1324 } 1325 1325 master->cvic = devm_of_iomap(&pdev->dev, np, 0, NULL); 1326 1326 if (IS_ERR(master->cvic)) { 1327 + of_node_put(np); 1327 1328 rc = PTR_ERR(master->cvic); 1328 1329 dev_err(&pdev->dev, "Error %d mapping CVIC\n", rc); 1329 1330 goto err_free; 1330 1331 } 1331 1332 rc = of_property_read_u32(np, "copro-sw-interrupts", 1332 1333 &master->cvic_sw_irq); 1334 + of_node_put(np); 1333 1335 if (rc) { 1334 1336 dev_err(&pdev->dev, "Can't find coprocessor SW interrupt\n"); 1335 1337 goto err_free;