From patchwork Thu Dec 7 16:10:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 175265 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4890553vqy; Thu, 7 Dec 2023 08:11:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlb3FDoD9NtKm0gn6YVVjzUXWD31OD7u/5Ti1wCOz7okHhuXcuRb2bRA6+BnC6OEkPCzfu X-Received: by 2002:a05:6a20:b28f:b0:18f:97c:5b93 with SMTP id ei15-20020a056a20b28f00b0018f097c5b93mr1903299pzb.97.1701965515523; Thu, 07 Dec 2023 08:11:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701965515; cv=none; d=google.com; s=arc-20160816; b=uu15Utr5HLsPBxQj7+cSsoInBtwn21HA2WM/etjB2iZ8UcsIqtMs9dv39NeZnOCo9i Yg7oaCUtTxr3lDqwWj94xJrbLG3T9hNiBILa8hDsQFZo+CJqGJxHhE2I1GoP9a6I0VSj +aAO4xvK7OwDEBbXGYh0q11p+eyMq2Y6XVdQDHuPtBkB4+gCZLn/7GX1q4I92DO0SJnv reL9wmBmCi867eA6xP9nPg8Snjk617Rn6ZyS1QALj5cJPfrzUy+9V7qqLQDgayDIGJCF f95lbU17ARAMrXTZD3wgi5CUz2ui8yAdyEYiUJM9cKM0jsaZx/AWy6mWFUiS8wBnKGK9 xojw== 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:dkim-signature; bh=UXMGWx05Oqhgl5suufkTuT8kZBkK433+J40SP+lUHbM=; fh=OOZGYjnagA7EEpD+GuPna2phxk0pxqDzBXmH7IvkE+0=; b=IVpmkpv3b2TX/FxNPNSerUft68e+5HrL8NAM006xL661B6JlH+pwV1MR+HilUWvJ3m 9hfYf0VjlQZin1rcZXTR5QZu6zUo1+umKrj+9t86yTYhUUX+hj0lrHN+PK8a+QZM2vyg pXeCAiKQ8GiSwjcp5662fc2kreAdTMgphP7HD30GMDWFgjKDB7iVjyvRrRKzKc0KUH0U 13/srgERwOFyjiZFI3bDE5SlaHP/aU6acOvB5YSL+tzpLXsGAjzoOSHdKsXmj5qA3VRN BS08IfDlC2KxvVWX8Gwoh/iS6Nr8HtDUrTNIAWB5VFMk3Os9TuNlfQJe9xxp8huk/eOO Crrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cnIq84J8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h68-20020a636c47000000b005c65e697bc4si1350475pgc.550.2023.12.07.08.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 08:11:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cnIq84J8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 27EDD80775A7; Thu, 7 Dec 2023 08:11:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232358AbjLGQK7 (ORCPT + 99 others); Thu, 7 Dec 2023 11:10:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232083AbjLGQK5 (ORCPT ); Thu, 7 Dec 2023 11:10:57 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F4F212D for ; Thu, 7 Dec 2023 08:11:03 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9e1021dbd28so144146066b.3 for ; Thu, 07 Dec 2023 08:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701965461; x=1702570261; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UXMGWx05Oqhgl5suufkTuT8kZBkK433+J40SP+lUHbM=; b=cnIq84J8SbgPnPG1J121gJudWFBv66DJ8jtMQ/fWftW8fuWwXez25NFxYwDwJC631w 6QjEz3y7hkkcvG6ZrOo3vyViJbyWjQ6i2WJHEdVsgVrql3f2Urwo8mtoN81WY8nmSQi8 qeixsxxAKP1ueJyCAyQPYs/qcv3BjhsyRlVbk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701965461; x=1702570261; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UXMGWx05Oqhgl5suufkTuT8kZBkK433+J40SP+lUHbM=; b=Ne5W4nvK8Wp0Bxbn65x7FhoAoHmQaNsVqMtlhHz7HjyYkLVzdsWlecqEBPTuVbD3qB KzCzb+lnicYbkO5rl45kYizykOQj7hIzjsPKk4hXh3JbV5qcglhaePYYh5bS8mhhRJoo BBPzj47CNww7mzSw/dkITW/PdH0Lnu4l6Bf1JW+Aw2lOhumAOarTBDlm7Oa8M8fHmyBi 91SwEoXyHpQlgIWRVylxVeIBcT3Sg9YXwLjIWmlewiMv0bOcSKGsJQiIKEWes+/N7kL8 VG2/m3H6o3l3EH5T3xJC6DUZSr+JSNHzL7Sw8jLR2ctdErfxWavjzOkmVrxPZ96NwNFi hCuA== X-Gm-Message-State: AOJu0Yy0sW0a4Tl4BGpgavOKz90BaFfaVlK00apgd9353ZgGGTn3YrhV u9MQv3IhfJHoUT0BV+0r+K8ZEBVPRam6KPEtuFB0EA== X-Received: by 2002:a17:906:e8b:b0:a1d:7f40:bebe with SMTP id p11-20020a1709060e8b00b00a1d7f40bebemr1678683ejf.126.1701965461446; Thu, 07 Dec 2023 08:11:01 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id k19-20020a170906681300b009a193a5acffsm989730ejr.121.2023.12.07.08.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 08:11:01 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Dario Binacchi , Andrzej Hajda , Daniel Vetter , David Airlie , Inki Dae , Jagan Teki , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Marek Szyprowski , Maxime Ripard , Neil Armstrong , Robert Foss , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH] drm/bridge: samsung-dsim: check the return value only if necessary Date: Thu, 7 Dec 2023 17:10:43 +0100 Message-ID: <20231207161056.183442-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 08:11:08 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784640192602128590 X-GMAIL-MSGID: 1784640192602128590 It was useless to check again the "ret" variable if the function register_host() was not called. Signed-off-by: Dario Binacchi Reviewed-by: Frieder Schrempf --- drivers/gpu/drm/bridge/samsung-dsim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index be5914caa17d..98cd589e4427 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -2020,11 +2020,11 @@ int samsung_dsim_probe(struct platform_device *pdev) else dsi->bridge.timings = &samsung_dsim_bridge_timings_de_high; - if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host) + if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host) { ret = dsi->plat_data->host_ops->register_host(dsi); - - if (ret) - goto err_disable_runtime; + if (ret) + goto err_disable_runtime; + } return 0;