Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp243245pxb; Tue, 2 Feb 2021 04:11:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzdSNdC2gCrhC3fqjTaNgPocRvDRgyc/F7JROF2OvTm0EPwFgY7uZDJ52oU3Jni9agVHekW X-Received: by 2002:a17:906:2b18:: with SMTP id a24mr7501221ejg.50.1612267887869; Tue, 02 Feb 2021 04:11:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612267887; cv=none; d=google.com; s=arc-20160816; b=L3u9UnhWGFMImhEWVH7iwiy7lTpHR7D97KkAvhiTJNnjez3Ewoof1A9NJSuRfH64wh qY5Grnk/zUwiDZkKuzKAlpMSzJXwafAa8ytDTV3uAAGkWQxi9KvEbyz4aqvc6/Qm3KPr Q8f0Pqcul6cf5c86qJrHbk3HqnVQbIgwOMzPdJZcd2q7heoa0Fvnbnmerxp2YRQysxXs +RtzC3Mtk/5Ev84K4AKesYYOoCSDQkwGfvYQNjPo/l0zJ2m5Xd3MRa+pZ7rBpkHhRy6l xbjVZgjB9rrYP9j8F5f8mHMH39knLXXxixWWmeg2r1FGM2MLqNt4DL1k5f3NoqgFeLFa EACg== 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=+VL/NEdQYmPEYgFmEv1pkN+1SB1upYO6E8Rh6MonsiY=; b=bv6wg0lrcKEcZZJk+DAA4HW+BxIf/PPBilutWYAaMvd8Rk7o1LesSWret0zSEYVFjV kZjoOSHlH3RFCWDIFGFUgIQrgEJYE0ShzzekLC3klW7dujKBIW952NM8b93CL3syCEcF wYQlzOZytp1dzBkYQbJQ6rgjMruge361bK5gBaY/6jvXL4zC10BC9FyOvMRZvT0OTVVL 29gaEJBObCei1f8lG+ScG0R4Y8CHKKd0j+Imqe80WZZJxWVUPTvZ2vx4iZNJpN492XO9 oqzIizQ329Keer/WYqGXUnMzQ7m1EHeSfgra8iLSZATUkKeLVwPvaEyjjBpjqyNoi3PM L80w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kl10si13368441ejc.291.2021.02.02.04.11.02; Tue, 02 Feb 2021 04:11:27 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231171AbhBBMIn (ORCPT + 99 others); Tue, 2 Feb 2021 07:08:43 -0500 Received: from mail-m17640.qiye.163.com ([59.111.176.40]:37188 "EHLO mail-m17640.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbhBBMId (ORCPT ); Tue, 2 Feb 2021 07:08:33 -0500 Received: from ubuntu.localdomain (unknown [157.0.31.124]) by mail-m17640.qiye.163.com (Hmail) with ESMTPA id E79955403BA; Tue, 2 Feb 2021 19:57:19 +0800 (CST) From: Bernard Zhao To: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Tomi Valkeinen , Sam Ravnborg , Andy Yan , Marek Szyprowski , Bernard Zhao , Joe Perches , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com Subject: [PATCH] drm/bridge/analogix: remove redundant when devm_kzalloc failed Date: Tue, 2 Feb 2021 03:56:59 -0800 Message-Id: <20210202115707.14410-1-bernard@vivo.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZTkhCSUpJQ09OSR9KVkpNSklJTUxLT0tJTkJVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0hNSlVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Pkk6FBw*FD8REzYIST8THjUW NygKCyNVSlVKTUpJSU1MS09LTU1KVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlKTkxV S1VISlVKSU9ZV1kIAVlBSU5OTDcG X-HM-Tid: 0a77629aadc4d995kuwse79955403ba Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Line 1590 DRM_ERROR is redundant because devm_kzalloc() already prints an error. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index aa1bb86293fd..8f6258eb9960 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1586,10 +1586,8 @@ static int analogix_dp_create_bridge(struct drm_device *drm_dev, int ret; bridge = devm_kzalloc(drm_dev->dev, sizeof(*bridge), GFP_KERNEL); - if (!bridge) { - DRM_ERROR("failed to allocate for drm bridge\n"); + if (!bridge) return -ENOMEM; - } dp->bridge = bridge; -- 2.29.0