mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
w1: tegra_w1: Don't disable clock if it was not enabled
Change-Id: I634c24768979fc2c9754f9b1d946dcb1ef1ff213 Signed-off-by: Colin Cross <ccross@android.com>
This commit is contained in:
@@ -252,7 +252,7 @@ static u8 tegra_w1_touch_bit(void *data, u8 bit)
|
||||
return_bit = 0;
|
||||
mutex_lock(&dev->mutex);
|
||||
if (!dev->ready)
|
||||
goto done;
|
||||
goto done_unlock;
|
||||
|
||||
clk_enable(dev->clk);
|
||||
w1_imask(dev, OI_BIT_XFER_DONE);
|
||||
@@ -292,6 +292,7 @@ done:
|
||||
w1_imask(dev, 0);
|
||||
dev->transfer_completion = NULL;
|
||||
clk_disable(dev->clk);
|
||||
done_unlock:
|
||||
mutex_unlock(&dev->mutex);
|
||||
return return_bit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user