Re: Annotate pm_runtime_resume_and_get() as __must_check ?
From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2021-08-03 13:07:38
From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2021-08-03 13:07:38
On Sat, Jul 31, 2021 at 11:36 AM Heiner Kallweit [off-list ref] wrote:
Seeing an erroneous use of pm_runtime_resume_and_get() in a patch I wonder whether we should annotate this function as __must_check. If the caller doesn't check the return code he doesn't know whether usage counter was bumped or not. Therefore I see a good chance that this results in a usage counter imbalance.
Sounds reasonable. Please send a patch to make that change.