mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: NeilBrown <[email protected]> Acked-by: Evgeniy Polyakov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
93518dd2eb
commit
b6c40b8581
1 changed files with 0 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue