Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1659195pxu; Thu, 8 Oct 2020 18:13:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkyJvzDFK3Bu5URAj9yqEHvycavWrc4jYc8MK2T5/ORiM/b0jvkfqbk2RQz40m1TgHCEL3 X-Received: by 2002:aa7:de97:: with SMTP id j23mr12066833edv.45.1602206006305; Thu, 08 Oct 2020 18:13:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602206006; cv=none; d=google.com; s=arc-20160816; b=uGiN07SZPBltnpbWuN1bKKLZfFd1ZOpwUvYU95TIkVyTJZOFhr9Vl3vdhe89BJhkN+ wiiUff9v3zczLm69+s+bJZng5eRKesUzHj4RWHrnpw7zE6vjc6rrco7+2t2t0A9Lcl01 TISADpFur/EHQVdMUHXzzfqqcuta3anypQaem8R95ssFZo7vp/VAr9gTndFM4dEvLgQe 3MH7tECo/3RERSqHBHkPOQpH4JY13MGpSCzLZggP66U3l2CndyoKZ6v08gmABuvQy0ey 2QgfdsmxW76FveIgfX8yVnUWP1wL6ZFfXerpCKyjPj92BjF44JM0BAxSI6PTwOr+piNl ns4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=1tKsLNFKLH7JJRMB4Mb9XvOOafWQQIbpscoeuCE+d24=; b=wcgzJkt5c4ncutKM5323XgKAGJa04iRVcS2nNU3c9FTOMQMHngCYiHvxjuJ66kDX3X SLbZfMrBA+T3e0nT+nLicO8epebUwd6ZUPUuZ9Z2gvY00/bgFyis6AP9hEHWXfPKUoh5 o6VjrXLoVI2MAZp0cSC6REHM25770W/AWBtGXowOpRrLmMpeEOI/klWDfO9onWraNlJL Qq3Nd+y0MsqZItKhw6tUkpQLZChWKv8deczIdnRdgsW4Nz5kLDO4Vf04NpMKtGckF/b5 GNK4z0dPD833xfyrtV1VxFwFjCGipJeHcEsU6PCgI8Ke6O5x6lQk5cHgZdWmcpy+AOeC eNjg== 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 12si5143529ejy.241.2020.10.08.18.13.01; Thu, 08 Oct 2020 18:13:26 -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 S1729272AbgJIBK1 (ORCPT + 99 others); Thu, 8 Oct 2020 21:10:27 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14753 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725979AbgJIBK0 (ORCPT ); Thu, 8 Oct 2020 21:10:26 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D0EDA1FD2288C3F2A90E; Fri, 9 Oct 2020 09:10:23 +0800 (CST) Received: from [10.174.177.149] (10.174.177.149) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Fri, 9 Oct 2020 09:10:18 +0800 Subject: Re: [PATCH -next] gnss: simplify the return expression of gnss_uevent To: Johan Hovold CC: References: <20200921131028.91837-1-miaoqinglang@huawei.com> <20201008144247.GJ26280@localhost> From: miaoqinglang Message-ID: Date: Fri, 9 Oct 2020 09:10:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20201008144247.GJ26280@localhost> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.149] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/10/8 22:42, Johan Hovold ะด??: > On Mon, Sep 21, 2020 at 09:10:28PM +0800, Qinglang Miao wrote: >> Simplify the return expression. >> >> Signed-off-by: Qinglang Miao > > The current code was written with an explicit error path on purpose, and > there's no need to change it. > > Same applies to your other gnss ubx patch. > Glad for knowing that and it sounds resonable to me. Thanks. >> --- >> drivers/gnss/core.c | 7 +------ >> 1 file changed, 1 insertion(+), 6 deletions(-) >> >> diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c >> index e6f94501c..e6b9ac9da 100644 >> --- a/drivers/gnss/core.c >> +++ b/drivers/gnss/core.c >> @@ -368,13 +368,8 @@ ATTRIBUTE_GROUPS(gnss); >> static int gnss_uevent(struct device *dev, struct kobj_uevent_env *env) >> { >> struct gnss_device *gdev = to_gnss_device(dev); >> - int ret; >> >> - ret = add_uevent_var(env, "GNSS_TYPE=%s", gnss_type_name(gdev)); >> - if (ret) >> - return ret; >> - >> - return 0; >> + return add_uevent_var(env, "GNSS_TYPE=%s", gnss_type_name(gdev)); >> } >> >> static int __init gnss_module_init(void) > > Johan > . >