Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953285pxk; Mon, 21 Sep 2020 01:05:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2l52aBu5lDN4bSPWUszEec3Y9TetyzJCnFvvzomCTbW8SdHfGB6vuhUC03rLyGPchX93N X-Received: by 2002:a50:eb92:: with SMTP id y18mr49832681edr.373.1600675525323; Mon, 21 Sep 2020 01:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675525; cv=none; d=google.com; s=arc-20160816; b=ubnN3SukLP0TjM1Nj7S8YQCBeee3MBQX1nsiRofgGtwxPxiexJ59xvXPv1FGyeAfAL dNNvtr7XidOPiYX6bT/DWXp5RujVR8JDvZx2rb2lNf+1hq6uJmeQFcXHtmC/C77JJqt6 6VATmjLxFDboEB8PtPt36hPcWnRlOeewpvEhi3XeW401tQSwkzobYd4sxhAipdcKKayt i1VGBAWeFEAa73wRQX0Hc+U9yUz8Uz4cfJzNeyIhgAXdOY4RS9ATLosidYyzOiPWK/E7 wtDPF2PQltmZoWIvI+Sg6ykSJL4QIA5CR1ozBHD/Jj4r685AZf9bnkLFPNtIaiistRjZ lc+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YU3QyQmkGY7vNpLHENpfdfz1NHwdK0KEfFrI9Gt3JWs=; b=0pwWS2knULsVcqLBtrDTANsvGvfIRF8YKXJ6zZ2UQ1NrY74Mice7z9Ixuji/GSRP2w 3i/j/SbsQEv1s1KOUsNOBUECNkFfUE7aMiK5Dw76N1GjYTZOctRlZQb+EP7SKOqVcaJu keDmWFBxkKJwhK2j3g8C7T85wjeLxCwPWNyvBZ7mBnvt0t8xxxUypR8Ld6StI45jDlbw WhdLe7v+Ziw7TIOxpFQniCo8cz0mNMJhNUD4Xuh0V2Ib3cqr0BMeqtQ1yoM3Q/iBGvTC aukIzZbNPx0Uj04tYXSFsOWrp+tyJU8OKSE0d5igJ6zXWte1uAKehAa7mcpxWs7Zay/3 bFAg== 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 n15si8748061eje.173.2020.09.21.01.05.02; Mon, 21 Sep 2020 01:05:25 -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 S1727003AbgIUIDH (ORCPT + 99 others); Mon, 21 Sep 2020 04:03:07 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13790 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726384AbgIUICl (ORCPT ); Mon, 21 Sep 2020 04:02:41 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E3BE2F69C7EA94DCF0E9; Mon, 21 Sep 2020 16:02:34 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:25 +0800 From: Liu Shixin To: Alessandro Zummo , Alexandre Belloni CC: , , Liu Shixin Subject: [PATCH -next] rtc: rv8803: simplify the return expression of rv8803_nvram_write Date: Mon, 21 Sep 2020 16:24:49 +0800 Message-ID: <20200921082449.2591981-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/rtc/rtc-rv8803.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c index 93c3a6b627bd..c6d8e3425688 100644 --- a/drivers/rtc/rtc-rv8803.c +++ b/drivers/rtc/rtc-rv8803.c @@ -454,13 +454,7 @@ static int rv8803_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) static int rv8803_nvram_write(void *priv, unsigned int offset, void *val, size_t bytes) { - int ret; - - ret = rv8803_write_reg(priv, RV8803_RAM, *(u8 *)val); - if (ret) - return ret; - - return 0; + return rv8803_write_reg(priv, RV8803_RAM, *(u8 *)val); } static int rv8803_nvram_read(void *priv, unsigned int offset, -- 2.25.1