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 <[email protected]> Fixes: 9fdf1d0 ("iio: adc: pac1921: Add ACPI support to Microchip pac1921") Acked-by: Matteo Martelli <[email protected]> Signed-off-by: Victor Duicu <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent a96d3e2 commit 34d9380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)