diff options
author | NeilBrown <neilb@suse.de> | 2012-02-19 06:10:00 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-25 02:25:50 +0400 |
commit | b6c40b8581d5f2c88d18d7905b9ff6ba9956f506 (patch) | |
tree | 7d2ff7f8aeaff9848d47eb86386370215b4e2a44 /drivers/w1 | |
parent | 93518dd2ebafcc761a8637b2877008cfd748c202 (diff) | |
download | linux-b6c40b8581d5f2c88d18d7905b9ff6ba9956f506.tar.xz |
w1_bq27000: remove unnecessary NULL test.
As recent change means that we now dereference 'dev' before testing
for NULL.
That means either the change was wrong, or the test isn't needed.
As this function is only called from one driver (bq27x000_battery) and
it always passed a non-NULL dev, it seems good to assume that the
test isn't needed.
So remove it.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/slaves/w1_bq27000.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/w1/slaves/w1_bq27000.c b/drivers/w1/slaves/w1_bq27000.c index 8f10fd2630a0..50d9af708b29 100644 --- a/drivers/w1/slaves/w1_bq27000.c +++ b/drivers/w1/slaves/w1_bq27000.c @@ -45,9 +45,6 @@ static int w1_bq27000_read(struct device *dev, unsigned int reg) u8 val; struct w1_slave *sl = container_of(dev->parent, struct w1_slave, dev); - if (!dev) - return 0; - w1_write_8(sl->master, HDQ_CMD_READ | reg); val = w1_read_8(sl->master); |