Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3325401rwa; Tue, 23 Aug 2022 02:53:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR6uLc/PnHsp3wMEJvhyBzvlExNaCzBMxpao3TuIKOjh5BSe7vU9d3V79rb8JzCPnwKPQMYg X-Received: by 2002:a63:8642:0:b0:41d:692e:e9f8 with SMTP id x63-20020a638642000000b0041d692ee9f8mr19337064pgd.462.1661248402345; Tue, 23 Aug 2022 02:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661248402; cv=none; d=google.com; s=arc-20160816; b=LZmou8w1BDn3kL4gmO4a0MARFoPCOdRUuUaJfmgZCYiai3vv8MnvLyzI51UAPgHqMK cYA6PwyvUQJPcEktbbEkhTFtZ3SS0UlxphfkiphOAYna461zSdg/SqVMjrARo9xHBI5U po1BMI4qxncmlFJ7Y92fiCNzshsthIPd3ebF9SXPaGrgHp2DSql1MN0+VMEpV7OwncEA BgSdmFhHURJMzcmq9L0/s07hCRmVpY/IqNwygsHivQL5uynJ+vn4qvy+4XM/rSrIhj5c VoIRuTua/QZm/qNM72JB0VHVKfIIPRbVvDD83xykiuuU1NuR0Xi2GIZrOM4njhZPRFIj 7X3w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Uop7EYX3pw9ZrwXz5hFliWr0m9UZCWAcxnecEBoUMUM=; b=D4hLElDpKuEMc/O3vfo2RP2cJpRF7Ja/N6dlJ/ykDRzyyE+P/iph7XojqqpmVuM8Xg fohQ8hViJxyOP+dre5makGxH2UKx5wVm30qifesOoA366TrkrGUmmU9CFXjvRs2fTOys J5ptFWCN4NUVKlqN1MoEU5A4URVrs27JMTV6OK5yB3OmoGh0UPRvu9seucjGR9NkSDRL JygV2d3nPFk3xd7hmeOQVOF2ZeHXBM8tXGkhSGxT3+SKYJZ+PGUXhfAgRA1lcftISOus TXPA71BfK7Eohje4tihxsi92zwicuJIS/8xKA1lATR0PzcGQno8PxWOreDWyWfvKPqzQ PCcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0sqMs1IW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a63610a000000b0040e64eee87fsi1810273pgb.722.2022.08.23.02.53.11; Tue, 23 Aug 2022 02:53:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0sqMs1IW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242451AbiHWJHy (ORCPT + 99 others); Tue, 23 Aug 2022 05:07:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346279AbiHWJGf (ORCPT ); Tue, 23 Aug 2022 05:06:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC93185F9B; Tue, 23 Aug 2022 01:29:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D33BE614C2; Tue, 23 Aug 2022 08:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8C2CC433D6; Tue, 23 Aug 2022 08:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243338; bh=P3egnqUA6ktWyvgwGA+OKZtXZmA0Wg8B7BsVUmsHoUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0sqMs1IWECNXUVTNltDtq3Yq9aA0N75+Cis2sYghkAGYi3yVmGig3SNqpX58ux9f5 VcFk6nH1oQVf4iONanwANwM4SrHlhTCsKGKfKwsfBt9DMsnR9MJbcEk8g8wmGZ5EEe 8bSBADDFeyajfCHhXx8EUAAWDINUx6MU6MkEJUpg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Vasut , Laurent Pinchart , Sam Ravnborg , Neil Armstrong , Sasha Levin Subject: [PATCH 5.19 246/365] drm/bridge: lvds-codec: Fix error checking of drm_of_lvds_get_data_mapping() Date: Tue, 23 Aug 2022 10:02:27 +0200 Message-Id: <20220823080128.500334591@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Marek Vasut [ Upstream commit 2bba782002c5dab6ca8d608b778b386fb912adff ] The drm_of_lvds_get_data_mapping() returns either negative value on error or MEDIA_BUS_FMT_* otherwise. The check for 'ret' would also catch the positive case of MEDIA_BUS_FMT_* and lead to probe failure every time 'data-mapping' DT property is specified. Fixes: 7c4dd0a266527 ("drm: of: Add drm_of_lvds_get_data_mapping") Signed-off-by: Marek Vasut Cc: Laurent Pinchart Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220801125419.167562-1-marex@denx.de Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/lvds-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c index 702ea803a743..39e7004de720 100644 --- a/drivers/gpu/drm/bridge/lvds-codec.c +++ b/drivers/gpu/drm/bridge/lvds-codec.c @@ -180,7 +180,7 @@ static int lvds_codec_probe(struct platform_device *pdev) of_node_put(bus_node); if (ret == -ENODEV) { dev_warn(dev, "missing 'data-mapping' DT property\n"); - } else if (ret) { + } else if (ret < 0) { dev_err(dev, "invalid 'data-mapping' DT property\n"); return ret; } else { -- 2.35.1