From patchwork Thu Aug 5 18:50:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 12421815 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A8F0C4338F for ; Thu, 5 Aug 2021 18:50:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFF2E60F3A for ; Thu, 5 Aug 2021 18:50:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AFF2E60F3A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96FD66EB28; Thu, 5 Aug 2021 18:50:45 +0000 (UTC) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B6536EB28 for ; Thu, 5 Aug 2021 18:50:44 +0000 (UTC) Received: by mail-ej1-x631.google.com with SMTP id e19so11164697ejs.9 for ; Thu, 05 Aug 2021 11:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=2j8GypBg1lwZCMqPRAhi18yzlw9Dx0/0JNmaPl31yQU=; b=b1qrJ2Y8rC9hl0zvq833pleey9cWiSFC9YvFPyJEOA+ZtXN9LtLWJ1ecVsc4XzO2TR SB4PGR1wv3Nz4oC8TgvmygIqTDtvkFEDDOdITpiDo0YxXUzrcgziA+ExzIetkz0hH2EF 3tRTaoQxNiyquFMUeWvgZU68E+MO9F9GnNviVDONNusnF8E7TpKiWlt36uKIxWkn98k4 wxZOrJBw8SNNnNur95hMsuKw0OKs2LUubT0SfkaW7ZrQIT0Nt8ND08vjr4LosiPvJ6vy /JppNh8AEEpRUO+ICvx+wTiiubmXk8yettSIHw9v0oHD/z4rU1ccm+/qegPe3k+vhpCj TDOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=2j8GypBg1lwZCMqPRAhi18yzlw9Dx0/0JNmaPl31yQU=; b=W4Wi/QVNdnaKVl6HuI4EAIp9LYdpGVcyFEJm0OKX+VLF2AFnN54CETW+BvfOKFjJcA DWp/UpJbcUBJE36nnj5eliItgE2mDYtWxtU6rkokyUJp3lu7HXCXpY2/vHlVEzKOaXsa snnw1M4Rgew8LD4+TE1kMu62yc5SdQE0ucppyhtbYPjEbigq4qHH4gUGFQFiK9XvX6Hx 5L0JpVTP1EzEgapCgwgW+C6AXzIADJ2dj0KEPMdJJ3jFtvuD3FC3ZJZMywpfKyb+2Jsi yJIqqnWHn21ZlglzxomChmpneaJpH4TcR3ESh3SoZaik8GEfghuPk1dN1gTKKufriP1X v7Hg== X-Gm-Message-State: AOAM5326ekJTY+C0sqVUOc/0fKR10KSkhAWfBYgdMzDhGe8xrpBLySnr ix1hYJIaM78LQ4Sh6JygcsxXNbSrwz4o/0Ja X-Google-Smtp-Source: ABdhPJw4OLpxupfMIMMTfPKVgRF1XjDBpxCm/kQiKX3LlE7aoBDcPj+kpiO7pBD/o2tqdncs+FTecg== X-Received: by 2002:a17:907:2096:: with SMTP id pv22mr6371552ejb.443.1628189442820; Thu, 05 Aug 2021 11:50:42 -0700 (PDT) Received: from xps7590.fritz.box ([2a02:2454:3e5:b700:d36e:2c7:3619:687]) by smtp.gmail.com with ESMTPSA id x42sm2716461edy.86.2021.08.05.11.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 11:50:42 -0700 (PDT) From: Robert Foss To: ple@baylibre.com, narmstrong@baylibre.com, a.hajda@samsung.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dan Carpenter Subject: [PATCH v1] drm: bridge: it66121: Check drm_bridge_attach retval Date: Thu, 5 Aug 2021 20:50:39 +0200 Message-Id: <20210805185039.402178-1-robert.foss@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The return value of drm_bridge_attach() is ignored during the it66121_bridge_attach() call, which is incorrect. Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver") Signed-off-by: Robert Foss Acked-by: Jernej Skrabec --- drivers/gpu/drm/bridge/ite-it66121.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c index 7149ed40af83..2f2a09adb4bc 100644 --- a/drivers/gpu/drm/bridge/ite-it66121.c +++ b/drivers/gpu/drm/bridge/ite-it66121.c @@ -536,6 +536,8 @@ static int it66121_bridge_attach(struct drm_bridge *bridge, return -EINVAL; ret = drm_bridge_attach(bridge->encoder, ctx->next_bridge, bridge, flags); + if (ret) + return ret; ret = regmap_write_bits(ctx->regmap, IT66121_CLK_BANK_REG, IT66121_CLK_BANK_PWROFF_RCLK, 0);