Skip to content

Commit 34d9380

Browse files
Victor Duicujic23
authored andcommitted
iio: adc: pac1921: Move ACPI_FREE() to cover all branches
This patch moves ACPI_FREE() in pac1921_match_acpi_device() in order to cover all branches. Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com> Fixes: 9fdf1d0 ("iio: adc: pac1921: Add ACPI support to Microchip pac1921") Acked-by: Matteo Martelli <matteomartelli3@gmail.com> Signed-off-by: Victor Duicu <victor.duicu@microchip.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://patch.msgid.link/20250117065314.4431-1-victor.duicu@microchip.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent a96d3e2 commit 34d9380

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iio/adc/pac1921.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,11 +1198,11 @@ static int pac1921_match_acpi_device(struct iio_dev *indio_dev)
11981198

11991199
label = devm_kstrdup(dev, status->package.elements[0].string.pointer,
12001200
GFP_KERNEL);
1201+
ACPI_FREE(status);
12011202
if (!label)
12021203
return -ENOMEM;
12031204

12041205
indio_dev->label = label;
1205-
ACPI_FREE(status);
12061206

12071207
return 0;
12081208
}

0 commit comments

Comments
 (0)