diff options
Diffstat (limited to 'drivers/hwmon/ina3221.c')
-rw-r--r-- | drivers/hwmon/ina3221.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c index e0637fed9585..0037e2bdacd6 100644 --- a/drivers/hwmon/ina3221.c +++ b/drivers/hwmon/ina3221.c @@ -1,17 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * INA3221 Triple Current/Voltage Monitor * * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/ * Andrew F. Davis <afd@ti.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. */ #include <linux/hwmon.h> @@ -721,8 +713,10 @@ static int ina3221_probe_from_dt(struct device *dev, struct ina3221_data *ina) for_each_child_of_node(np, child) { ret = ina3221_probe_child_from_dt(dev, child, ina); - if (ret) + if (ret) { + of_node_put(child); return ret; + } } return 0; |