summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-12-22 22:22:24 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-14 15:16:51 +0100
commitb5a0d4bf2ee80e47629df0d7d8f4a7952ca39941 (patch)
tree6767c462c2606221bde9ea73c47446e16c267451 /drivers
parent444972b2b268c3272d39105bdc8d1266177f5d42 (diff)
misc: pti: remove redundant assignments to retval
The variable retval is assigned with a value that is never read and it is re-assigned a new value later on. The assignment is redundant and can be removed. Clean up multiple occurrances of this pattern. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20191222222224.732340-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/pti.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c
index 359c5bab45ac..abef3221d8ae 100644
--- a/drivers/misc/pti.c
+++ b/drivers/misc/pti.c
@@ -792,7 +792,7 @@ static int pti_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
unsigned int a;
- int retval = -EINVAL;
+ int retval;
int pci_bar = 1;
dev_dbg(&pdev->dev, "%s %s(%d): PTI PCI ID %04x:%04x\n", __FILE__,
@@ -910,7 +910,7 @@ static struct pci_driver pti_pci_driver = {
*/
static int __init pti_init(void)
{
- int retval = -EINVAL;
+ int retval;
/* First register module as tty device */