Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1764548rdb; Thu, 7 Dec 2023 08:11:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/ZvRo46N/LY+fMiEjJYw6CIiq8sD2Gin2eZ55B4gGpChIE1ok9Hjml9wQ3oVHbWPTLtOn X-Received: by 2002:a05:6a20:e113:b0:18f:80d6:34ac with SMTP id kr19-20020a056a20e11300b0018f80d634acmr2670233pzb.46.1701965516597; Thu, 07 Dec 2023 08:11:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701965516; cv=none; d=google.com; s=arc-20160816; b=OuxWl2cCQlCcPJRHQ5A3OIzLgN5lMHBtofNEGQeyw3+dZuXSmW9cQLAhZGKPE1gv0z RHuXEjX2RrEWzzxUUolu19HJhvddb4u/E1eL3Lxm6DByyFR/lYw+PJlv7IJcqYOzZ+XH lG9lqn5+0fJYbiJLHI9etbpViCdmAilboGgFuPgpclbHCis0sEXK/3drFrHb1nlgbdw6 YpQ9lUUZop/thUZdfzYhOwYRyAMpv3VV68f72lXOGKV4ZdOSshVJdYeq8g72mmlnWVZq f3PP/qyOx61nPohXCTrePc4H9Wzh0FcNGyTDnWzDy8bleO4PofYxrPT0qMD61+t8hxZm vWRQ== 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 Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id k9-20020a63ba09000000b0057e21f51ab3si1361965pgf.665.2023.12.07.08.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 08:11:56 -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 14D3080775B3; Thu, 7 Dec 2023 08:11:10 -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 Content-Transfer-Encoding: 8bit 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:10 -0800 (PST) It was useless to check again the "ret" variable if the function register_host() was not called. Signed-off-by: Dario Binacchi --- 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; -- 2.43.0