]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
w1_bq27000: remove unnecessary NULL test.
authorNeilBrown <neilb@suse.de>
Sun, 19 Feb 2012 02:10:00 +0000 (13:10 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 22:25:50 +0000 (14:25 -0800)
commitb6c40b8581d5f2c88d18d7905b9ff6ba9956f506
tree7d2ff7f8aeaff9848d47eb86386370215b4e2a44
parent93518dd2ebafcc761a8637b2877008cfd748c202
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>
drivers/w1/slaves/w1_bq27000.c