Skip to content

Commit 429a22c

Browse files
Colin Ian Kingdavem330
authored andcommitted
yam: remove redundant null check on dev
yam_open has a redundant null check on null, it will never be called with dev == NULL. Remove this redundant check. This also cleans up a smatch warning: drivers/net/hamradio/yam.c:869 yam_open() warn: variable dereferenced before check 'dev' (see line 867) Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e2a553d commit 429a22c

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/hamradio

1 file changed

+1
-1
lines changed

drivers/net/hamradio/yam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ static int yam_open(struct net_device *dev)
866866

867867
printk(KERN_INFO "Trying %s at iobase 0x%lx irq %u\n", dev->name, dev->base_addr, dev->irq);
868868

869-
if (!dev || !yp->bitrate)
869+
if (!yp->bitrate)
870870
return -ENXIO;
871871
if (!dev->base_addr || dev->base_addr > 0x1000 - YAM_EXTENT ||
872872
dev->irq < 2 || dev->irq > 15) {

0 commit comments

Comments
 (0)