Skip to content

Commit 95edbbf

Browse files
Yang Yingliangjwrdegoede
authored andcommitted
platform/x86: amd-pmc: Fix missing unlock on error in amd_pmc_send_cmd()
Add the missing unlock before return from function amd_pmc_send_cmd() in the error handling case. Fixes: 95e1b60 ("platform/x86: amd-pmc: Fix command completion code") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 23e9592 commit 95edbbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/amd-pmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static int amd_pmc_send_cmd(struct amd_pmc_dev *dev, bool set, u32 *data, u8 msg
275275
PMC_MSG_DELAY_MIN_US * RESPONSE_REGISTER_LOOP_MAX);
276276
if (rc) {
277277
dev_err(dev->dev, "failed to talk to SMU\n");
278-
return rc;
278+
goto out_unlock;
279279
}
280280

281281
/* Write zero to response register */

0 commit comments

Comments
 (0)