Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3139165pxk; Mon, 21 Sep 2020 06:18:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/fg2dZmgz6Po4RvlWm9+s+PcGrNIeWNs+DjTVdFaSwVn6VBFeZgedg0mFoGJgq8i+FPPN X-Received: by 2002:a17:906:70d4:: with SMTP id g20mr52402326ejk.413.1600694307971; Mon, 21 Sep 2020 06:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600694307; cv=none; d=google.com; s=arc-20160816; b=zPTFpSU/dQyKTWvbZgz/2JcCbFC5U8KnSroTYDLtdt2skDYpPbe33kRhYbrebK3pH3 h3jXnZkYY6t2Ljptpocp1kjNT4LxbsEi7PBBoC7st4LtM9RNHP+K4ViKuw6qwsyucizt ZrpNnDH2CqC+F4dS6ukqNrP66X6OJ0HIBxpkXgjR4+CTkC5ts1UM/c/pe9toFZnRy6bF 5qEUd1Zg7yAnnGCSI2oraGtATij9Pn0/BwE9v0smb2ueFIb3mIsSXDqiQRl0kH86HwU2 hYz4KAOhcidGHTERaSk+84PSBjiR2GCbcC29F7k0N0LbvHaXupg37N4tSHCFVc1gY9Zb bVdw== 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=iS1E5rP+kIa+X6C3MewRSNDBRBR9ZwRz2cy6aoxlzxA=; b=cqZPDSQtcY28y1KsvppPeNb4wCSPZ1NBmlY92lXERu6edMnNbFItBjck5lSuaJOwJf 0eTxaO94+TDLavKubLfQq51qNPXQxRSQutO+Nz8j+OdHh1A2LJnUPkLLSvpLmTFr7UW2 zn6hSjrOJYGZUADNMtOVPG17FGGU8doVy2BQABV7kgpTUEf16X3kPagpix69nR1gEOhW lv/tMpVGFc7cp44u3AFk6RV3SUkqc1pGXAPXwCKBQ0H3ijxpSvExY08IlpqlUlbl9QGp lyIFk5vNZsulW0sEKkVgY1tnmZQGj0iUhZqS3rXzozphuUSF2uQVWfjtR/ux/m/awGFj Ptzw== 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 d3si8181961ejm.474.2020.09.21.06.18.03; Mon, 21 Sep 2020 06:18:27 -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 S1727423AbgIUNNt (ORCPT + 99 others); Mon, 21 Sep 2020 09:13:49 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13802 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727227AbgIUNKM (ORCPT ); Mon, 21 Sep 2020 09:10:12 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2F6E49D0A94E9EA8856C; Mon, 21 Sep 2020 21:10:10 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:04 +0800 From: Qinglang Miao To: Johan Hovold CC: , Qinglang Miao Subject: [PATCH -next] gnss: simplify the return expression of gnss_uevent Date: Mon, 21 Sep 2020 21:10:28 +0800 Message-ID: <20200921131028.91837-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/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) -- 2.23.0