From: Markus Elfring Date: Tue, 02 Jun 2020 09:05:07 +0000 Subject: Re: [PATCH] spi: sprd: call pm_runtime_put if pm_runtime_get_sync fails Message-Id: <8ea80af8-e964-4488-25c6-837f2ac88493@web.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Navid Emamdoost , linux-spi@vger.kernel.org Cc: Navid Emamdoost , Kangjie Lu , Stephen McCamant , Qiushi Wu , Baolin Wang , Mark Brown , Orson Zhai , Chunyan Zhang , Dinghao Liu , LKML , kernel-janitors@vger.kernel.org > Call to pm_runtime_get_sync increments counter even in case of > failure leading to incorrect ref count. > Call pm_runtime_put_noidle if pm_runtime_get_sync fails. How do you think about a wording variant like the following? Change description: The PM runtime reference counter is generally incremented by a call of the function “pm_runtime_get_sync”. Thus call the function “pm_runtime_put_noidle” also in one error case to keep the reference counting consistent. Would you like to add the tag “Fixes” to the commit message? Regards, Markus