Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp137044ybh; Tue, 21 Jul 2020 18:44:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKpdl2FZ1DO1ln/ynctydGZewtSRKSmk9ja7EGjmrlN+H6iybXvu1ngWPfmu5si/MBCJsK X-Received: by 2002:aa7:d88e:: with SMTP id u14mr28902245edq.11.1595382268229; Tue, 21 Jul 2020 18:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595382268; cv=none; d=google.com; s=arc-20160816; b=CZpSV86roMNIQ3pArkli55G2QnbLQ2nvuFmacmR5Lal87P19miswHkBk/ImrTSJ0nj TA6OeHfIZqUm2j0nnhM/sI1xyStT9smlFUMUajoS0/MOo4+s54XaH7sf0c/0QoZX+N5a 19W0gug3E1wTB0LmGdT9p4Z8QA2PCaplwQd/jgicvRz2TdxWowGj7uhi/Ao5uwtcR82r e389R9rwNn/BJQMSysFyBI61RlmGjKkg4nA3oTZfKeMZQkorwDlqOWQGnRf5ouYf0lED Cq12xAcy9eEug/WYl6bcjU4wJjmhODJ0geMsepN0KLwi/he7qD3s6ISruk4omqWo3APW lZmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=WIzKcgR5Vlvi8QLxa/SmkMQG/PjcdB8op3HGPhtP5/8=; b=fInh8u8hhRuHsfHDFxXH2OO8y52dPgwv2yJxgN307NuJY/qKDWo5/kvzaHMaBfSSiC kBgqamcqIMp5YWj/8XiaIep6WxGBwNsuqENDxBB/OtYVZ562kmGM/ltcqCpA8yBAO2e3 lwKtUPpX/36S89rcMMfEl7VqkMPQFI4k6qYma/aRdFZAKES70n/C2NLnN3daLbszPXAo tAjM2ATs1w6TPH79YsFrvGtyJ4H/ZMNzF2LOhIiipo+yfeuW2rVm97naa5iQSlkFrbZF oVcsh/ff4SbvOVus1R2qo/q2ufXvNszt2oBZJm2U0dzWHjmIRD/jlqFiCvEf3HLuRIU2 hIoQ== 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 h6si14620722ejq.405.2020.07.21.18.44.06; Tue, 21 Jul 2020 18:44:28 -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 S1731633AbgGVBlR (ORCPT + 99 others); Tue, 21 Jul 2020 21:41:17 -0400 Received: from mail-m17613.qiye.163.com ([59.111.176.13]:2255 "EHLO mail-m17613.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727795AbgGVBlQ (ORCPT ); Tue, 21 Jul 2020 21:41:16 -0400 Received: from njvxl5505.vivo.xyz (unknown [157.0.31.125]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id 26F984824FA; Wed, 22 Jul 2020 09:41:14 +0800 (CST) From: Bernard Zhao To: Icenowy Zheng , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Bernard Zhao Subject: [PATCH] drm/panel: remove meaningless if(ret) check code. Date: Wed, 22 Jul 2020 09:41:07 +0800 Message-Id: <20200722014107.26045-1-bernard@vivo.com> X-Mailer: git-send-email 2.17.1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZSEoYQ0keTEpKSUxOVkpOQk5IQ0lLTE9IT0tVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0hKTFVKS0tZBg++ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6M1E6Tjo*Oj8iTBU3LwEMEw48 VjZPCkxVSlVKTkJOSENJS0xPQ0tNVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlKTkxV S1VISlVKSU5ZV1kIAVlBSkJPSzcG X-HM-Tid: 0a73742e8bb293bakuws26f984824fa Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function drm_panel_add always returns true. So if(ret) check code will never run into error branch. Remove these check make the code a bit readable. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c b/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c index fddbfddf6566..7f2eb54e4254 100644 --- a/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c +++ b/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c @@ -478,9 +478,7 @@ static int k101_im2ba02_dsi_probe(struct mipi_dsi_device *dsi) if (ret) return ret; - ret = drm_panel_add(&ctx->panel); - if (ret < 0) - return ret; + drm_panel_add(&ctx->panel); dsi->mode_flags = MIPI_DSI_MODE_VIDEO; dsi->format = MIPI_DSI_FMT_RGB888; -- 2.17.1