Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2627456pxk; Mon, 14 Sep 2020 20:07:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPBT9hzGJtIka+AMd0aORmNI6AfE91iXLB0BHndBwI9uxL0pVcBIshcnPxnV8Ll94D6oNY X-Received: by 2002:a17:906:12c7:: with SMTP id l7mr17581370ejb.306.1600139276457; Mon, 14 Sep 2020 20:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600139276; cv=none; d=google.com; s=arc-20160816; b=ZHmYh7gBiAYx1J24tkdzT/Q+edWDgYqB7ZhSQtNQWdYaxiXleZ7t731Ar8C79wpwxZ StPuDGU7iJmFDlIKrDosJ+xEQhhxAfT5il+pJlDMG2gi4kJGru0DL+dEwKJyyRIejPog 7/sKA3MEFPAbyXgx7vrFbVVRhR+HalTRNyc43oW+M8Bb/nJntYSYyLfBHY0hDO9Xk0Gu ieAI5gvdCockWm49Kxk1YEKZCVltfdvbRibYK/BCyAFh1P22NpgAmwJjHXd8sJZm3ldh fvjNx3DI4/bFTKgFKeBegyJO21Uk5k0A2GonGE6BZpjZJg01AGRRt6H6VVrZPEQk9ITG ruig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6Y20F6GMO5w51/JLLmRdQUvXPpFRlugwOBpqpUlpKfQ=; b=FGVXeCkZvfIukm1DR0X/6SJpPkgxXhSPsAIyqexlfTLf/hS9/S6jatt1RoaZoE1bTi h2yOUMGjsIeo5y6sNN+1uE+jbUhzgcRTAqxPHEbvM3cdecjhO+8+tAZr/e9UZdc7nPWo j3Nov7k0IzZKEzFXjlh+G96IVTPRxnax0FYqClRMvk/6DUpOK2ud4ypOPM7EIAOPKSrz ECoDJhDnVZtn52U3olvS4jQmYVrbOJg6R22kkU/moWU5oWXRwOeU957TfQm5BfX18frH dA0Ev+FNvR89yadGd2qEiF4h+8fabYXLQdMV8FDQWzanpBxYXXRZu1vE9GiAnmkoWPn7 JZRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l27si8333561eja.9.2020.09.14.20.07.34; Mon, 14 Sep 2020 20:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726198AbgIODE1 (ORCPT + 99 others); Mon, 14 Sep 2020 23:04:27 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:12259 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726134AbgIODEF (ORCPT ); Mon, 14 Sep 2020 23:04:05 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 453C7E7913AC087AB982; Tue, 15 Sep 2020 11:04:02 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Tue, 15 Sep 2020 11:03:54 +0800 From: Liu Shixin To: Evgeniy Polyakov CC: , Liu Shixin Subject: [PATCH -next] w1: ds2490: simplify the return expression of ds_reset() Date: Tue, 15 Sep 2020 11:26:32 +0800 Message-ID: <20200915032632.1772725-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- 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