Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2148089iof; Tue, 7 Jun 2022 21:21:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgaJu9fAWgK6RH8gMtXxQA2c9tnz8mvQ0Fl/tsZFbWxeIsSk3t6Hz0l3MNT/V5SVz7E3ls X-Received: by 2002:a17:902:e34b:b0:166:342f:82c6 with SMTP id p11-20020a170902e34b00b00166342f82c6mr31577729plc.29.1654662065503; Tue, 07 Jun 2022 21:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662065; cv=none; d=google.com; s=arc-20160816; b=dvKXYqWYFF/fE3Y0XhLgBBdB/QDVvGb6TvcYkYA17DsgP7DTB0W9ZJ7lKVSmrzLjKH NbZ2fZWg5STJ1sb++bpXFRrhgv59zBEqLvCSbCGWtgCEdpHrMy7dlb2ae6MfP7r6E+Ot 36g3rBuLmhnlU/8h6Lwuir7VsF6lP7bnHHSkulev6rku1Y6hzu3CR/uD94Zt+p5/X1Wz 6+I98Z7SR7hLM5VQuKz1KxZBYsIyyeqm3Q0YctSw9mpcM86b/z3LHV3msIhzvzNo1v08 mOa4y0yFqSC7MvCOz6HBOkz7rArMxxttRq+kMJc+uLSAXxymZa3U7T/8ZDM8ONZPRlQT AMKw== 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=luLsaVaCGQz/Y+zpdWjZTYRTMJasovm89GsKh19Hq1U=; b=Ptt/6hBQsfhyN5tlgsSrMJer1+9Z2OblKe4dR/BGAAOgBGhkscF1D2hwO0CaZjJ7++ p3PPlZXyRJ8zG1UF5o236dR/fag9dubhKNM2cmygkZbxQs/3ykIlRjYy1GcXi88KWZYO pZKJpLkFITdtTIAhQgZCyo/NuVyK2+kn51FFE8V1vSCxV8Ra0xe0GySE3xkR2lDPHH+6 wDkAqdiHVDl4Qx7Lux9tsM6sWUxcxEtAFa2kMDX0yDo1kRiNC0T1ayMLgPpuVCveRCku jbewbyzguXvuRM/cyWwRWEhjllx6aoZXng+O6hd9JhOYaO9Dwpb0ODvYewyLPEz70PZE kSSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D7d3wYM+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id t144-20020a635f96000000b003fdd8b52809si9524735pgb.831.2022.06.07.21.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:21:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D7d3wYM+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 F3CC03C8832; Tue, 7 Jun 2022 20:52:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346237AbiFGRYv (ORCPT + 99 others); Tue, 7 Jun 2022 13:24:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345915AbiFGRUt (ORCPT ); Tue, 7 Jun 2022 13:20:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05C2B1059C4; Tue, 7 Jun 2022 10:20:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id 8F22EB822B0; Tue, 7 Jun 2022 17:20:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1B33C385A5; Tue, 7 Jun 2022 17:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622442; bh=jxgzeRVlGIsHZ8OH4MRJO1jMySOYdjsQ6g1qIZCAgEI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D7d3wYM+v0jBfG1UH4Fij4ps1HmP7EB6KmtPyUyKOYN4KWiZM1TpFWR0Aj7XqHFFO nJmc5Ye02RuWCozAkHrOemPSgG0uRY4TI4TzANCTIYXWbW9gIfAHKUNdSgKuI8/PRQ gWmGSWkcsJDB5EL7qiyAiP+JqMBZinZqGKlc40sE= 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.10 059/452] drm: msm: fix error check return value of irq_of_parse_and_map() Date: Tue, 7 Jun 2022 18:58:36 +0200 Message-Id: <20220607164910.306680891@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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 e193865ce9a2..9baaaef706ab 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -598,9 +598,9 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev) pdev = mdp5_kms->pdev; 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