Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2170315iof; Tue, 7 Jun 2022 22:04:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzty36kDpYQiZZJmvYv3rk2k8SnseD4Z2G8ITtsoLWv374TAwIBvxroh6fo1zJ0CoTfuWE5 X-Received: by 2002:a17:902:d682:b0:163:cb15:dda1 with SMTP id v2-20020a170902d68200b00163cb15dda1mr31778208ply.36.1654664680705; Tue, 07 Jun 2022 22:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654664680; cv=none; d=google.com; s=arc-20160816; b=DD+R8H6bCAwOAzvQrl4cwrcBflWs/StdKLgLOa/zHF3xxx9b+vtS4SPNZtzMio0AXb /sqyZqqQyRkFrAET4vf5+O+R8LfJKUZbkE9VOjkiR46mSS9eOmOm2sagzAP0NezZ92c8 hAu5K8mEOEZ4uoRaNEMnqi9r2mDYv9NvSHfd6jB5yApZBVeXOeBX8B4REuiiQwZXgnve EfVMTvX6TULzlueZ+EVIvsPf1s8SdLvwsYGoJRFyKzy9oIQ74M1XYcyjRS+nb41Ycr2X UWPeqs5jXMJYk7AuOrogvfkNg6DCdQV4T8fHbh6ROBBv2xyjIpfQ82xNenGzU8wn0Siw uT0g== 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=HhDzt3L4jYCii76o0QuzWv8+L+l+YBQfE6ClB87oXvg=; b=JrtO+bD19Om/hFRFpXaAKw8D1hrkb/aZdCUydfzz85qwV6UCBnfIayUlxFQUi0cbV+ He40ekVpcnMjJwJHX7c+9Rlr+rgkLZckorRij6KOWmJBvtu5hIPp+AyMODYsU0OWD5up vSNpiLGdZM6Q7PbHIcDA9KSpVrF/saE0LNecs9ymrZJBuqPIZmnG5dhX8aAiFs7GNe1I 4JJDuunf7Tx/FXLz/k5otUPDcDKzyw35XxaOaGX4YxT+l0ibdRwkqFGtZbJKnx2LnRJ5 YKqqVdEP5LBlFjiwHGkP1Lb5kexTB8A8Y/q1Zt7QsqrkYqx/IDYo3vNaSUScVjoMUYIX 6QSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bg/NmM5c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a10-20020a634d0a000000b003fbfc221ef4si27283866pgb.424.2022.06.07.22.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:04:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bg/NmM5c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AD7C7460932; Tue, 7 Jun 2022 21:32:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384349AbiFGWLB (ORCPT + 99 others); Tue, 7 Jun 2022 18:11:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377717AbiFGVIv (ORCPT ); Tue, 7 Jun 2022 17:08:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16572132A7; Tue, 7 Jun 2022 11:51:01 -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 D4640616A9; Tue, 7 Jun 2022 18:51:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E72FEC385A2; Tue, 7 Jun 2022 18:50:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627860; bh=dMH/huRRqAdoiUb0Rl7RxxXYfjvxgvx+UaGWVg1/P4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bg/NmM5c4SEv5dvVDuXZjvHBhjrJ9EH0JPBBlv7NP9bUP3NZnruE2AqCOa7qb/gNF iuMKcP+XHkqGQb87uma6U+imf9Yp7Lj6ZBqh8oRLYzVRdxmo13eFZAU+d9hIZewPPg dawDGDAUVPTP+rQbfdR/74qooL5Zb4yXp4Dj3Cpc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zeal Robot , Lv Ruyi , Dmitry Baryshkov , Sasha Levin Subject: [PATCH 5.18 120/879] drm: msm: fix error check return value of irq_of_parse_and_map() Date: Tue, 7 Jun 2022 18:53:58 +0200 Message-Id: <20220607165006.185252914@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Lv Ruyi [ Upstream commit b9e4f1d2b505df8e2439b63e67afaa287c1c43e2 ] The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/483175/ Link: https://lore.kernel.org/r/20220424031959.3172406-1-lv.ruyi@zte.com.cn Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c index 3b92372e7bdf..1d4bbde29320 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -570,9 +570,9 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev) } irq = irq_of_parse_and_map(pdev->dev.of_node, 0); - if (irq < 0) { - ret = irq; - DRM_DEV_ERROR(&pdev->dev, "failed to get irq: %d\n", ret); + if (!irq) { + ret = -EINVAL; + DRM_DEV_ERROR(&pdev->dev, "failed to get irq\n"); goto fail; } -- 2.35.1