Skip to content

Commit

Permalink
tokenring: remove unneeded NULL checks
Browse files Browse the repository at this point in the history
"fw_entry" is always non-NULL at this point and anyway
release_firmware() handles NULL parameters.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Aug 22, 2010
1 parent 739a91e commit 773bc97
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/tokenring/tms380tr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,14 +1321,12 @@ static int tms380tr_reset_adapter(struct net_device *dev)

/* Clear CPHALT and start BUD */
SIFWRITEW(c, SIFACL);
if (fw_entry)
release_firmware(fw_entry);
release_firmware(fw_entry);
return (1);
}
} while(count == 0);

if (fw_entry)
release_firmware(fw_entry);
release_firmware(fw_entry);
printk(KERN_INFO "%s: Adapter Download Failed\n", dev->name);
return (-1);
}
Expand Down

0 comments on commit 773bc97

Please sign in to comment.