All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] eeprom: idt_89hpesx: Put fwnode in matching case during ->probe()
@ 2021-06-07 22:17 Andy Shevchenko
  2021-06-07 22:17 ` [PATCH v1 2/3] eeprom: idt_89hpesx: Restore printing the unsupported fwnode name Andy Shevchenko
  2021-06-07 22:17 ` [PATCH v1 3/3] eeprom: idt_89hpesx: use SPDX-License-Identifier Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-06-07 22:17 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Huy Duong

device_get_next_child_node() bumps a reference counting of a returned variable.
We have to balance it whenever we return to the caller.

Fixes: db15d73e5f0e ("eeprom: idt_89hpesx: Support both ACPI and OF probing")
Cc: Huy Duong <qhuyduong@hotmail.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/misc/eeprom/idt_89hpesx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index 81c70e5bc168..45a61a1f9e98 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -1161,6 +1161,7 @@ static void idt_get_fw_data(struct idt_89hpesx_dev *pdev)
 	else /* if (!fwnode_property_read_bool(node, "read-only")) */
 		pdev->eero = false;
 
+	fwnode_handle_put(fwnode);
 	dev_info(dev, "EEPROM of %d bytes found by 0x%x",
 		pdev->eesize, pdev->eeaddr);
 }
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-07 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 22:17 [PATCH v1 1/3] eeprom: idt_89hpesx: Put fwnode in matching case during ->probe() Andy Shevchenko
2021-06-07 22:17 ` [PATCH v1 2/3] eeprom: idt_89hpesx: Restore printing the unsupported fwnode name Andy Shevchenko
2021-06-07 22:17 ` [PATCH v1 3/3] eeprom: idt_89hpesx: use SPDX-License-Identifier Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.