]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86/amd: pmc: Use guard(mutex)
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 17 Dec 2024 19:39:51 +0000 (13:39 -0600)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 19 Dec 2024 14:15:32 +0000 (16:15 +0200)
commitf947ea8dd657ed70c0c02b35ac485a24366201d3
tree237339bf12d421e3228d2d6a283a4a2e74a67abe
parent9e0894d07072e50b83ef077ce91e504bdb7484a3
platform/x86/amd: pmc: Use guard(mutex)

Instead of using the `goto label; mutex_unlock()` pattern use
`guard(mutex)` which will release the mutex when it goes out of scope.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241217194027.1189038-2-superm1@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/pmc/pmc.c