mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
regulator: Fix for v6.16
One minor fix for a leak in the DT parsing code in the max20086 driver. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhMXpMACgkQJNaLcl1U h9DxfAf/Sk4lxMl2JHbjk+TYXz5Q+Y04fpGYMCnV1u64kq9yxB2NKBjMomS6YysY qsueW1caCJM/D/8MUqkU6mbQxGCt6V8eKWjVxcjfPOEM/lWCP+FfsMOdu9rXij1s bhR4fI7jmaDYNjwaDCnyK7F0/TxUj5GiOPV3d+5C3gQ6VXFB+wTs1jzalvszP7WP 3doM/U8NZH7gg7zztvKW8l89d8OWCc7L83dW/ecrAAMX+jbi6JC8qT5VTbKkdSfs Y1dPrTloRIj+z1n72YY6RLsqD8qO5P5KW2wy1qbnqFEZx82s0xFcAgcCkkeK3lnG He8R+qqfZvjL1o+shdlCHthr+R82Bw== =bJgB -----END PGP SIGNATURE----- Merge tag 'regulator-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "One minor fix for a leak in the DT parsing code in the max20086 driver" * tag 'regulator-fix-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: max20086: Fix refcount leak in max20086_parse_regulators_dt()
This commit is contained in:
commit
601dddb6c5
|
|
@ -5,6 +5,7 @@
|
|||
// Copyright (C) 2022 Laurent Pinchart <laurent.pinchart@idesonboard.com>
|
||||
// Copyright (C) 2018 Avnet, Inc.
|
||||
|
||||
#include <linux/cleanup.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/i2c.h>
|
||||
|
|
@ -133,11 +134,11 @@ static int max20086_regulators_register(struct max20086 *chip)
|
|||
static int max20086_parse_regulators_dt(struct max20086 *chip, bool *boot_on)
|
||||
{
|
||||
struct of_regulator_match *matches;
|
||||
struct device_node *node;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
node = of_get_child_by_name(chip->dev->of_node, "regulators");
|
||||
struct device_node *node __free(device_node) =
|
||||
of_get_child_by_name(chip->dev->of_node, "regulators");
|
||||
if (!node) {
|
||||
dev_err(chip->dev, "regulators node not found\n");
|
||||
return -ENODEV;
|
||||
|
|
@ -153,7 +154,6 @@ static int max20086_parse_regulators_dt(struct max20086 *chip, bool *boot_on)
|
|||
|
||||
ret = of_regulator_match(chip->dev, node, matches,
|
||||
chip->info->num_outputs);
|
||||
of_node_put(node);
|
||||
if (ret < 0) {
|
||||
dev_err(chip->dev, "Failed to match regulators\n");
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user