From: Dan Carpenter Date: Mon, 27 Oct 2014 10:45:06 +0000 (+0300) Subject: regulator: max77802: fix a test in max77802_set_suspend_mode() X-Git-Tag: firefly_0821_release~176^2~2777^2~2^4~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bf2753755fe0f6b77f73636a2fe3f39a84ab1ca8;p=firefly-linux-kernel-4.4.55.git regulator: max77802: fix a test in max77802_set_suspend_mode() The original test triggers a static checker warning. Javier Martinez Canillas says that the "!" is a typo and should be removed. Fixes: 2e0eaa1aa008 ('regulator: max77802: Add set suspend mode for BUCKs and simplify code') Signed-off-by: Dan Carpenter Acked-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c index 5839c4509e1f..7718c8aa0d7c 100644 --- a/drivers/regulator/max77802.c +++ b/drivers/regulator/max77802.c @@ -179,7 +179,7 @@ static int max77802_set_suspend_mode(struct regulator_dev *rdev, * If the regulator has been disabled for suspend * then is invalid to try setting a suspend mode. */ - if (!max77802->opmode[id] == MAX77802_OFF_PWRREQ) { + if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) { dev_warn(&rdev->dev, "%s: is disabled, mode: 0x%x not set\n", rdev->desc->name, mode); return 0;