Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3134474pxk; Mon, 21 Sep 2020 06:12:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJGcaYHGXF656sKzbmTGJ8Zb5AdMxO3tM4F7RM+pLcOpOHlh7xSytXBbrVqExl8cKHVLli X-Received: by 2002:aa7:da89:: with SMTP id q9mr51237624eds.111.1600693968149; Mon, 21 Sep 2020 06:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600693968; cv=none; d=google.com; s=arc-20160816; b=YiTBVL075LghATJ/S9W+PhfgpQ0ZKCdKz2pXbOcpnH84yQo4WMyvlcGLhuGkrgQD7m mBSemieBHVoy5IlDozgFVnMLiu+wlFMbbiXvb2JdtfJkuWar8nXaMVInqLfWYFR4O0EZ mUmMGaR/aba+N3qJMzv2sbkdnmoj8AMEniB3HzR6bR5sxXso4mlnUDuI+MGUGU3fP8KF OFDyRVynjRYe9mJhuWmDEx446QEJiXgFcnBf+a1AgxppNNAjLYmmOSkuFl3Ob6G6qGuq rBMgj/7EHZ1uhsxCcxEVDMJN+G9Bi3VRQB5GGGIQU97qc7HN1xrmqaqMel6JbKt2O1TB FHIA== 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=GtOMEzDRqNMhBfCprEnRifczV2HpQfbJNsAfDobCY3s=; b=jv26RVPGh4vdc6si4rmtq3Um1Bg+F/nhgnLogPaW+UVlSAtsBI/c32PynWeysQ8m6P 4Nt9wkpvwy9ki3AwEHGxy0xxODaWNZX9wvRHMny6o/sCQrlLL7tN772U9+WDMISPbpwo YvPyGIvPpkTBgpJ32xq9bZNal48pcpbBmLRRFPjqh0TBJsd59Y5ARdPVdTSu93yvX6ri 7fd2IGWY6+aZtg0UykI/nOj5wwAzqdTqHgdkg35Hr8usBzofFw77OwsJQO9atkxDj5Yj cZHsKNrtXZrZjC55/kDZ7ZC8cFTTe7YQ9PEpzA3z6S3Yga33ZCAcarAQC/lS+aw/NOSX Ldag== 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 b19si8043348ejd.451.2020.09.21.06.12.23; Mon, 21 Sep 2020 06:12:48 -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 S1727422AbgIUNKn (ORCPT + 99 others); Mon, 21 Sep 2020 09:10:43 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13764 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727396AbgIUNKm (ORCPT ); Mon, 21 Sep 2020 09:10:42 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id AB7FC6204E7E87FB805C; Mon, 21 Sep 2020 21:10:37 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:27 +0800 From: Qinglang Miao To: Linus Walleij , Bartosz Golaszewski , Bartlomiej Zolnierkiewicz CC: , , , , , Qinglang Miao Subject: [PATCH -next] omapfb: connector-hdmi: simplify the return expression of hdmic_connect Date: Mon, 21 Sep 2020 21:10:51 +0800 Message-ID: <20200921131051.92661-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/gpio/gpio-cs5535.c | 6 +----- drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c | 7 +------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpio/gpio-cs5535.c b/drivers/gpio/gpio-cs5535.c index 53b24e3ae..57b9ddffd 100644 --- a/drivers/gpio/gpio-cs5535.c +++ b/drivers/gpio/gpio-cs5535.c @@ -345,12 +345,8 @@ static int cs5535_gpio_probe(struct platform_device *pdev) mask_orig, mask); /* finally, register with the generic GPIO API */ - err = devm_gpiochip_add_data(&pdev->dev, &cs5535_gpio_chip.chip, + return devm_gpiochip_add_data(&pdev->dev, &cs5535_gpio_chip.chip, &cs5535_gpio_chip); - if (err) - return err; - - return 0; } static struct platform_driver cs5535_gpio_driver = { diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c index 49551afbd..670b9c6eb 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c @@ -50,18 +50,13 @@ static int hdmic_connect(struct omap_dss_device *dssdev) { struct panel_drv_data *ddata = to_panel_data(dssdev); struct omap_dss_device *in = ddata->in; - int r; dev_dbg(ddata->dev, "connect\n"); if (omapdss_device_is_connected(dssdev)) return 0; - r = in->ops.hdmi->connect(in, dssdev); - if (r) - return r; - - return 0; + return in->ops.hdmi->connect(in, dssdev); } static void hdmic_disconnect(struct omap_dss_device *dssdev) -- 2.23.0