Skip to contentSkip to conversation

spi: spidev: Remove unneeded variable

PATCH Applied Fabio Estevam 2 participants 2 messages May 9, 2015 – May 11, 2015 1 message not in the archive SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: spidev: Remove unneeded variable

From: Fabio Estevam <[email protected]>

Remove unneeded variable used to store return value.

The semantic patch that makes this change is available in scripts/coccinelle/misc/returnvar.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

---
 drivers/spi/spidev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/spi/spidev.c +1 -2
index b00ae96..dd616ff 100644
@@ -635,7 +635,6 @@ err_find_dev:
 static int spidev_release(struct inode *inode, struct file *filp)
 {
 	struct spidev_data	*spidev;
-	int			status = 0;
 
 	mutex_lock(&device_list_lock);
 	spidev = filp->private_data;
@@ -664,7 +663,7 @@ static int spidev_release(struct inode *inode, struct file *filp)
 	}
 	mutex_unlock(&device_list_lock);
 
-	return status;
+	return 0;
 }
 
 static const struct file_operations spidev_fops = {
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1431187039-10573-1-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Applied
#2 lore raw
Quoted 3 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Remove unneeded variable used to store return value.

Applied, thanks.