Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953839pxk; Mon, 21 Sep 2020 01:06:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPo4ZHzsvNGEKSX2z1Jq8igXr57Py3SE9QQZ4/iS5oosmOvQgANIaTIMQz2pq59/4TViTS X-Received: by 2002:aa7:d382:: with SMTP id x2mr51702985edq.108.1600675597132; Mon, 21 Sep 2020 01:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675597; cv=none; d=google.com; s=arc-20160816; b=jU4PZYimzE8A9gtnnFVUcSpO9Ysts7kYz/txbOCWswbFzkOOXCmUbQjK3HJU0ywLmp zs6SXadHLPUJHNvCDQlFItS0ysvmJy3hTVXfwIrc0U1M7LnBnTM89iJgqAWOkMGHmLyo SaVrnx74wjgy/mHd91YOv1okxNw48GT5AkA/Ye083ULhbRDojmRCU6hKxr08kxkXC7fX 8WvB07ErpCWcRhDaOrZKIGyMMpHB/OUu06AU5ee3RsIoKjGmK8/impUY0muDyTCUp8iO B3CXz77hp1TgfQhZ9lLZc20jqDXAr82B/1MMLrrLSwasnsC2H7BtwdtJ0JqX59C1tBtO QzNg== 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=+KdSpwA+p5X0p2FR9ef4Vu7UGp4LR2+g53T2U4XHHIs=; b=KpiJs/MJmsolwixXAJp7iddeyJhsV97tJ5IgNApyoIJnO0gfhUHQHQYMsnrVzE5SZg PoIkTMRsDgy/O4rve0HyugVpJLpRUykDMMiNmjmFNN9NixvwkNbxdfJprj0my2fJBI0s Vs40+l+jMRQkhn8YPPorVhEcGXcjrbJ3YIwwBaOMd/CYcZK7tzE1wBKVW2ciuTDOBrWm w/4Av69mc7lBajRiRQf+WsMhztz9oQ5bwysWIFfamawB6qakUIif7ufxOdomLoWciZ6O pbac2K4PBTbbSgD5yInznYkiOWpIaXlgX4f3TGYy7hl7GIrf6mxNGC1/a8Cp8HQjAj1T yy3g== 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 i10si7898308edr.13.2020.09.21.01.06.13; Mon, 21 Sep 2020 01:06:37 -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 S1726883AbgIUICX (ORCPT + 99 others); Mon, 21 Sep 2020 04:02:23 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47696 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726551AbgIUICQ (ORCPT ); Mon, 21 Sep 2020 04:02:16 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id BCFD0C7075D59CFE6278; Mon, 21 Sep 2020 16:02:14 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:08 +0800 From: Liu Shixin To: Wu Hao , Tom Rix , Moritz Fischer CC: , , Liu Shixin Subject: [PATCH -next] fpga: dfl: simplify the return expression of fme_perf_pmu_register Date: Mon, 21 Sep 2020 16:24:33 +0800 Message-ID: <20200921082433.2591305-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/fpga/dfl-fme-perf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/fpga/dfl-fme-perf.c b/drivers/fpga/dfl-fme-perf.c index 531266287eee..e881fbe6d838 100644 --- a/drivers/fpga/dfl-fme-perf.c +++ b/drivers/fpga/dfl-fme-perf.c @@ -906,7 +906,6 @@ static int fme_perf_pmu_register(struct platform_device *pdev, { struct pmu *pmu = &priv->pmu; char *name; - int ret; spin_lock_init(&priv->fab_lock); @@ -926,11 +925,7 @@ static int fme_perf_pmu_register(struct platform_device *pdev, name = devm_kasprintf(priv->dev, GFP_KERNEL, "dfl_fme%d", pdev->id); - ret = perf_pmu_register(pmu, name, -1); - if (ret) - return ret; - - return 0; + return perf_pmu_register(pmu, name, -1); } static void fme_perf_pmu_unregister(struct fme_perf_priv *priv) -- 2.25.1