diff options
Diffstat (limited to 'drivers/platform/x86/intel/int3472/tps68470.c')
-rw-r--r-- | drivers/platform/x86/intel/int3472/tps68470.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c index f83e9c393f31..5b8d1a9620a5 100644 --- a/drivers/platform/x86/intel/int3472/tps68470.c +++ b/drivers/platform/x86/intel/int3472/tps68470.c @@ -128,15 +128,15 @@ skl_int3472_fill_clk_pdata(struct device *dev, struct tps68470_clk_platform_data for_each_acpi_consumer_dev(adev, consumer) { sensor_name = devm_kasprintf(dev, GFP_KERNEL, I2C_DEV_NAME_FORMAT, acpi_dev_name(consumer)); - if (!sensor_name) + if (!sensor_name) { + acpi_dev_put(consumer); return -ENOMEM; + } (*clk_pdata)->consumers[i].consumer_dev_name = sensor_name; i++; } - acpi_dev_put(consumer); - return n_consumers; } |