Skip to content

Commit 660d187

Browse files
PeiweiHugroeck
authored andcommitted
hwmon: (xgene-hwmon) Add free before exiting xgene_hwmon_probe
Call kfifo_free(&ctx->async_msg_fifo) before error exiting instead of returning directly. Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com> Link: https://lore.kernel.org/r/tencent_C851C0324431466CBC22D60C5C6AC4A8E808@qq.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent f103b2e commit 660d187

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/hwmon/xgene-hwmon.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,10 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
659659

660660
acpi_id = acpi_match_device(pdev->dev.driver->acpi_match_table,
661661
&pdev->dev);
662-
if (!acpi_id)
663-
return -EINVAL;
662+
if (!acpi_id) {
663+
rc = -EINVAL;
664+
goto out_mbox_free;
665+
}
664666

665667
version = (int)acpi_id->driver_data;
666668

0 commit comments

Comments
 (0)