diff options
author | Colin Ian King <colin.king@canonical.com> | 2013-03-27 19:25:04 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-27 19:30:55 +0100 |
commit | 429a22ca39e531d9f8bacac1f81f7207909bcbd2 (patch) | |
tree | 32193c308f165af8f7b4c1496110c70233ad146e /drivers/net/hamradio/yam.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-429a22ca39e531d9f8bacac1f81f7207909bcbd2.tar.xz linux-429a22ca39e531d9f8bacac1f81f7207909bcbd2.zip |
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 <colin.king@canonical.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio/yam.c')
-rw-r--r-- | drivers/net/hamradio/yam.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index 4cf8f1017aad..b2d863f2ea42 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c @@ -866,7 +866,7 @@ static int yam_open(struct net_device *dev) printk(KERN_INFO "Trying %s at iobase 0x%lx irq %u\n", dev->name, dev->base_addr, dev->irq); - if (!dev || !yp->bitrate) + if (!yp->bitrate) return -ENXIO; if (!dev->base_addr || dev->base_addr > 0x1000 - YAM_EXTENT || dev->irq < 2 || dev->irq > 15) { |