Skip to content

Commit

Permalink
PCI: versatile: Remove redundant variable retval
Browse files Browse the repository at this point in the history
Variable retval is being assigned a value that is never read, the
variable is redundant and can be removed.

Cleans up clang scan build warning:
drivers/pci/controller/pci-versatile.c:37:10: warning: Although the value
stored to 'retval' is used in the enclosing expression, the value is never
actually read from 'retval' [deadcode.DeadStores]

Link: https://lore.kernel.org/r/20220418144416.86121-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
  • Loading branch information
Colin Ian King authored and Lorenzo Pieralisi committed Apr 28, 2022
1 parent 3123109 commit 6086987
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pci/controller/pci-versatile.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ static u32 pci_slot_ignore;

static int __init versatile_pci_slot_ignore(char *str)
{
int retval;
int slot;

while ((retval = get_option(&str, &slot))) {
while (get_option(&str, &slot)) {
if ((slot < 0) || (slot > 31))
pr_err("Illegal slot value: %d\n", slot);
else
Expand Down

0 comments on commit 6086987

Please sign in to comment.