Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3137158pxk; Mon, 21 Sep 2020 06:15:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbHjV7jwbq2n7CFz4RIkN5WrfVAG2HEKzaiV+p+ZQJz5MD0tCOcwGxBY3Zepw5J8NJOrxX X-Received: by 2002:a17:906:934f:: with SMTP id p15mr51108155ejw.497.1600694155205; Mon, 21 Sep 2020 06:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600694155; cv=none; d=google.com; s=arc-20160816; b=FlFoOpeZK8jziGBkfbWYQpI23fEQd4fjvtHwfD9HEjFBCkYdhABnt3UC/rTLT/oJKO 2r+bQMypFlxiBiWE3XP5SAQYexqajW8aLGJ3Lslw/25ZqVz5Ol4ptdyERTURx6Z9bSpG vwOwY02RiYFsorTiTGKSJozScMyu//S2nBsHF9TMC5b0SLV8TmYJqkmOR00uPH+5felZ eVlwyQikIoHHvxnyvknJ+VeMh69J4Y+foD1OMyTF3W+G20qJtVtDF2Kz6PWFeNXdQ97Q rnbKWpCNuE+tyV90mWi6p627G797eBC+NNQ5Rt+H00mvSU7qozJmKXKlrXc49ajlK3Dg VKmw== 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=/CLz8f12E7HpT32gKEq1yhoHrButZOljeU+86NJvUwg=; b=tq8p1pMHx/KlkXhYQ9FuHaXRhx8Q1C88LbkQKNnvdQUEwMueRqhCjdfiavl/HOtw6h awVIN7zQVAZJvB7Fu1XveyUqYrcwavcXwfEtXV+J8o7izvqlDF98gCnWXNXgd1WFH4kS SQ6egZJDF300vMNdRCaxv0So6YNlUSm3LULLfjlMRj2C30hgfobPPyjczjGRq3ugWtBH GTw2f2ZV9uOrzZl5QPmFNlrtBgMBIWmwcnhhoalnKmglnmDMTXk5mXA+sHZhqmXyHj3Z T7rGBW90qzA6V/RIZkDuqNfJARgc9kYTE8hd6gbXcA/6sT2neWDrMuB5i+l8s9hKkxuQ WTsw== 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 ha1si8836292ejb.406.2020.09.21.06.15.31; Mon, 21 Sep 2020 06:15:55 -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 S1727290AbgIUNKR (ORCPT + 99 others); Mon, 21 Sep 2020 09:10:17 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13757 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727238AbgIUNKN (ORCPT ); Mon, 21 Sep 2020 09:10:13 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5EAA957A65AC674696D2; Mon, 21 Sep 2020 21:10:11 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:05 +0800 From: Qinglang Miao To: Johan Hovold CC: , Qinglang Miao Subject: [PATCH -next] gnss: simplify the return expression of ubx_set functions Date: Mon, 21 Sep 2020 21:10:29 +0800 Message-ID: <20200921131029.91882-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Qinglang Miao --- drivers/gnss/ubx.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gnss/ubx.c b/drivers/gnss/ubx.c index 7b05bc405..7a22fc901 100644 --- a/drivers/gnss/ubx.c +++ b/drivers/gnss/ubx.c @@ -24,25 +24,15 @@ struct ubx_data { static int ubx_set_active(struct gnss_serial *gserial) { struct ubx_data *data = gnss_serial_get_drvdata(gserial); - int ret; - ret = regulator_enable(data->vcc); - if (ret) - return ret; - - return 0; + return regulator_enable(data->vcc); } static int ubx_set_standby(struct gnss_serial *gserial) { struct ubx_data *data = gnss_serial_get_drvdata(gserial); - int ret; - ret = regulator_disable(data->vcc); - if (ret) - return ret; - - return 0; + return regulator_disable(data->vcc); } static int ubx_set_power(struct gnss_serial *gserial, -- 2.23.0