Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3134694pxk; Mon, 21 Sep 2020 06:13:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsp0TA4t+D6u72Bf1UK8sU+HwlEoVb6TTxmejF+NJM0BP2ADRf9BIMmuGRA5CsSA5zzutQ X-Received: by 2002:aa7:d747:: with SMTP id a7mr50672871eds.304.1600693983467; Mon, 21 Sep 2020 06:13:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600693983; cv=none; d=google.com; s=arc-20160816; b=SWAEyirDkZcUhWg06J3Ua1nt2bMkix7RGqkIg+gAs7djxgjBzkRjVdE9fJi12b4kma 2g/7ZosF6wlahHdiiCLEA8hovtZDzTXj5Z4meGdDmZ2IXVsvoOOwwkG9koBUU450Sior suo2wF1aYORHrPZWUzyUtImRYmcSW/Nd8Y2ZCh9Z3bhqWGdCObiE9BYUzQneRhWjp+YU 3RppHqp2uLWiDv5cpJWNoNedyzeinntPlppS8nHK6wSQ+zhFhaW0eC/7BY2ouCv724tu YfCLVRS7Loynv4FKHe4S+pERi7YkpCYMObHR3z6I5gG5caFOFaOfgBFKekv3m9q2ae8m dFJQ== 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=Wu8TTJSqXdkc82fP2afMDYiCkmVAGUN2hP9AOu3p6kw=; b=mocYNd5JyRfd2NFtiOaU7RgOM5mBxpI0zZ21D89vPTBZC7MuoVhABgTARdNb7zRNnv hxhZWoJ+LcMioRq0Shpwp705mDNdqs7qKBQukGLR9uk7mE7ejkJbyFjshCEa9+LUG6F9 iy7w9e/deW5B23xvsE7sSL9FaSXbzV2br2vHvgyqME2jMdS4ELlPCbbUHkI0cTA8f9zs jLe6VhDX30clfvIp70iXTt9ByQFpjcSDrrRsvZylVwU0EANiRAVqObI9k6Qs4uUcCsBy 7p9GxSqBVxLRvwnDPkpLMF9eWjVp67PnXvsZ96f62WzX26nIpnDgYE+tL1HdRg+npcNL aTFw== 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 d1si8082183ejw.555.2020.09.21.06.12.40; Mon, 21 Sep 2020 06:13:03 -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 S1727466AbgIUNK4 (ORCPT + 99 others); Mon, 21 Sep 2020 09:10:56 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13808 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727428AbgIUNKx (ORCPT ); Mon, 21 Sep 2020 09:10:53 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id EAFC137D5C4A578F6FB8; Mon, 21 Sep 2020 21:10:51 +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:42 +0800 From: Qinglang Miao To: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , "Mark Brown" CC: , , , Qinglang Miao Subject: [PATCH -next] spi: npcm-fiu: simplify the return expression of npcm_fiu_probe() Date: Mon, 21 Sep 2020 21:11:06 +0800 Message-ID: <20200921131106.93228-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/spi/spi-npcm-fiu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c index 9468e71f0..341f7cffe 100644 --- a/drivers/spi/spi-npcm-fiu.c +++ b/drivers/spi/spi-npcm-fiu.c @@ -677,7 +677,6 @@ static int npcm_fiu_probe(struct platform_device *pdev) struct npcm_fiu_spi *fiu; void __iomem *regbase; struct resource *res; - int ret; int id; ctrl = spi_alloc_master(dev, sizeof(*fiu)); @@ -736,11 +735,7 @@ static int npcm_fiu_probe(struct platform_device *pdev) ctrl->num_chipselect = fiu->info->max_cs; ctrl->dev.of_node = dev->of_node; - ret = devm_spi_register_master(dev, ctrl); - if (ret) - return ret; - - return 0; + return devm_spi_register_master(dev, ctrl); } static int npcm_fiu_remove(struct platform_device *pdev) -- 2.23.0