Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2183537iof; Tue, 7 Jun 2022 22:28:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw09iVBFk2ye0j6w/2rQ2pzGdA+WwHl0fnseU/0rPzNF0KkIv+EcwncPOx0+sYufJEEhFbt X-Received: by 2002:a17:90b:1101:b0:1e8:5df5:b2ac with SMTP id gi1-20020a17090b110100b001e85df5b2acmr21573452pjb.239.1654666105734; Tue, 07 Jun 2022 22:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654666105; cv=none; d=google.com; s=arc-20160816; b=Il56Bc39u/W6jGDzGuk84OB5x+aQKLhqBa8T41XC7pCUv7PUN3omaptIbkpxgcbYh3 Buk9ZW/myKrof+VcOAAuwiLRxRSz6trk9q6vHpY4IXHHIv1YHNZaR/Gzzo18wUAPwOZ5 YdEIoRkAniH2FY/Sls5UF9GCPKgI8MpUOF3UhbHTCVXLykDXJS7oZGWsHYwLz+YGjiJP fj+m809YhFTNBPns2StW1vXhX+mCNp7OCoz+4HrKYyNqmb/mIuY+7v3/GGPziIdqaW4D J67Zb7LhYUflHPQY7Kr6M3w/7hM4fbaPAqIFBnJzr7YudcokvYqhzIbEv1Qcft6LVHMQ Wmew== 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=YTatnvb03Q9FbbQXUCrrl8doHi4jOkm+sCMYzJAxMiI=; b=0K/fK1sBAwQDrq7HNNYARHgb42g8oaRXqBHRSmJWLMUYtql+5lWAWYaoZsGbTmk1eb oSybSq2glpPKJtgc9Jc2Rnp6lU29o5dFwiH9PgP53TaEip9SWMbeRV6QC1pwvrqo981z LtWaLtx+rIYkDUjH6YyB+RYC3b1zhERjt78Ec6BDic61KkXV0aQY7DEMTzTavdRdWdiS /oylNS0gwU4tUTitoRihGw8zqSTQoKIlcT18BG7le2Se4igi4MXJbv+ULNfGBTaOh/qa jCUC7lVCdGwFHlBaEPaqtwVChNYkS1A0YYUdyMDKFQydjJAD8f62Mu8G0SQu110jVoQC Me4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=donxoJjp; 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 t21-20020a634615000000b003fa1e2e80a9si25093889pga.659.2022.06.07.22.28.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:28:25 -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=donxoJjp; 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 1457947F15B; Tue, 7 Jun 2022 21:55:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386048AbiFGWmV (ORCPT + 99 others); Tue, 7 Jun 2022 18:42:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380675AbiFGVbJ (ORCPT ); Tue, 7 Jun 2022 17:31:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7152622AE51; Tue, 7 Jun 2022 12:03:20 -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 C5FC6B8233E; Tue, 7 Jun 2022 19:03:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35B92C385A2; Tue, 7 Jun 2022 19:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628597; bh=spiReyOjOYDqeb1zsBh97ggWT78W6Mw8bZj/fRwx4rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=donxoJjpfyfKoiqpool73OT2cMD20KflRVJmuEkoVQjQ9PcKyarFqnLHI+w/7HwMH FxL87IiJ5DOAtGnHHGXA+GA2DEI7lIPIyi8WbRSEonsMlxv3gsX2yykY5NJGzacdc1 4dbEUt7XES53vVRem/rmAfphRVIaH0HjAr4gGdIM= 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 370/879] drm/msm/dp: fix error check return value of irq_of_parse_and_map() Date: Tue, 7 Jun 2022 18:58:08 +0200 Message-Id: <20220607165013.612330180@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 e92d0d93f86699b7b25c7906613fdc374d66c8ca ] The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets") Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/483176/ Link: https://lore.kernel.org/r/20220424032418.3173632-1-lv.ruyi@zte.com.cn Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/dp/dp_display.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 332065b882af..b3bfe9ac9d80 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1255,10 +1255,9 @@ int dp_display_request_irq(struct msm_dp *dp_display) dp = container_of(dp_display, struct dp_display_private, dp_display); dp->irq = irq_of_parse_and_map(dp->pdev->dev.of_node, 0); - if (dp->irq < 0) { - rc = dp->irq; - DRM_ERROR("failed to get irq: %d\n", rc); - return rc; + if (!dp->irq) { + DRM_ERROR("failed to get irq\n"); + return -EINVAL; } rc = devm_request_irq(&dp->pdev->dev, dp->irq, -- 2.35.1