regulator: max77802: fix a test in max77802_set_suspend_mode()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 27 Oct 2014 10:45:06 +0000 (13:45 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 27 Oct 2014 18:18:21 +0000 (18:18 +0000)
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 <dan.carpenter@oracle.com>
Acked-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max77802.c

index 5839c4509e1fda86a2452a8101fd8d856445677c..7718c8aa0d7cd129429fa23f9717768ab4c7cf27 100644 (file)
@@ -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;