Message ID | 20250117065314.4431-1-victor.duicu@microchip.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v3] iio: adc: pac1921: Move ACPI_FREE() to cover all branches | expand |
On Fri, Jan 17, 2025 at 8:55 AM <victor.duicu@microchip.com> wrote: > > From: Victor Duicu <victor.duicu@microchip.com> > > This patch moves ACPI_FREE() in pac1921_match_acpi_device() > in order to cover all branches. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c index 90f61c47b1c4..63f518215156 100644 --- a/drivers/iio/adc/pac1921.c +++ b/drivers/iio/adc/pac1921.c @@ -1198,11 +1198,11 @@ static int pac1921_match_acpi_device(struct iio_dev *indio_dev) label = devm_kstrdup(dev, status->package.elements[0].string.pointer, GFP_KERNEL); + ACPI_FREE(status); if (!label) return -ENOMEM; indio_dev->label = label; - ACPI_FREE(status); return 0; }