Re: [PATCH v1] drivers/i2c/muxes:Fix resource leaks in device_for_each_child_node() loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wang,

> diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
> index 5d5cbe013..90966de7a 100644
> --- a/drivers/i2c/muxes/i2c-mux-gpio.c
> +++ b/drivers/i2c/muxes/i2c-mux-gpio.c
> @@ -106,6 +106,7 @@ static int i2c_mux_gpio_probe_fw(struct gpiomux *mux,
>                 } else if (is_acpi_node(child)) {
>                         rc = acpi_get_local_address(ACPI_HANDLE_FWNODE(child), values + i);
>                         if (rc)
> +                               fwnode_handle_put(child);
>                                 return dev_err_probe(dev, rc, "Cannot get address\n");
>                 }

please, read it again and tell me what's wrong :)

Andi



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux