NFC: trf7970a: Remove useless local variable
authorMark A. Greer <mgreer@animalcreek.com>
Tue, 23 Sep 2014 18:25:45 +0000 (11:25 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 23 Sep 2014 22:28:22 +0000 (00:28 +0200)
The trf7970a_suspend() routine always returns
zero so don't use a local return variable to
hold the return value.  This fixes up a smatch
warning.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/trf7970a.c

index 2a521bb380603c898889f044bd1953294a6e25ad..00149a9a50ef6a9affc7e959a782701fc5ac67e6 100644 (file)
@@ -2123,7 +2123,6 @@ static int trf7970a_suspend(struct device *dev)
 {
        struct spi_device *spi = container_of(dev, struct spi_device, dev);
        struct trf7970a *trf = spi_get_drvdata(spi);
-       int ret = 0;
 
        dev_dbg(dev, "Suspend\n");
 
@@ -2133,7 +2132,7 @@ static int trf7970a_suspend(struct device *dev)
 
        mutex_unlock(&trf->lock);
 
-       return ret;
+       return 0;
 }
 
 static int trf7970a_resume(struct device *dev)