Simplify the return expression.
Signed-off-by: Liu Shixin <[email protected]>
---
drivers/w1/masters/ds2490.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index e17c8f70dcd0..d42da8bde06c 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -464,8 +464,6 @@ static int ds_wait_status(struct ds_device *dev, struct ds_status *st)
static int ds_reset(struct ds_device *dev)
{
- int err;
-
/* Other potentionally interesting flags for reset.
*
* COMM_NTF: Return result register feedback. This could be used to
@@ -475,11 +473,7 @@ static int ds_reset(struct ds_device *dev)
* COMM_SE which allows SPEED_NORMAL, SPEED_FLEXIBLE, SPEED_OVERDRIVE:
* Select the data transfer rate.
*/
- err = ds_send_control(dev, COMM_1_WIRE_RESET | COMM_IM, SPEED_NORMAL);
- if (err)
- return err;
-
- return 0;
+ return ds_send_control(dev, COMM_1_WIRE_RESET | COMM_IM, SPEED_NORMAL);
}
#if 0
--
2.25.1