Skip to content

Commit

Permalink
soc: qcom: pmic_glink: Drop redundant pg assignment before taking lock
Browse files Browse the repository at this point in the history
Commit e9f826b ("soc: qcom: pmic_glink: simplify locking with
guard()") was on top of a fix [1] which was moving the 'pg =
__pmic_glink' assignment into the critical section.  Unfortunately the
actual fix was not applied and instead rebased version of the next patch
got in.  The resulting code is in general correct, but now there is a
duplicated assignment 'pg = __pmic_glink'.

[1] https://lore.kernel.org/all/20240822164815.230167-1-krzysztof.kozlowski@linaro.org/

Fixes: e9f826b ("soc: qcom: pmic_glink: simplify locking with guard()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250111172326.101779-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Bjorn Andersson committed Feb 5, 2025
1 parent 2014c95 commit 1ac98d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/soc/qcom/pmic_glink.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static void pmic_glink_pdr_callback(int state, char *svc_path, void *priv)

static int pmic_glink_rpmsg_probe(struct rpmsg_device *rpdev)
{
struct pmic_glink *pg = __pmic_glink;
struct pmic_glink *pg;

guard(mutex)(&__pmic_glink_lock);
pg = __pmic_glink;
Expand Down

0 comments on commit 1ac98d6

Please sign in to comment.