Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2185124iof; Tue, 7 Jun 2022 22:31:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/spDd9WOLTot5tLiT8K7XNO5+PYr+onC5+88x53twSM8zZkGpAgwX/8YtvJi+4qP8JuEU X-Received: by 2002:a63:8bc3:0:b0:3fc:c8d7:f3c8 with SMTP id j186-20020a638bc3000000b003fcc8d7f3c8mr28634822pge.96.1654666270791; Tue, 07 Jun 2022 22:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654666270; cv=none; d=google.com; s=arc-20160816; b=f9iGX/+5caprE3J/1KbbHhXfGONq4AijExySiUEnIrTMGJNAQDmEhjYveSooJgvZfH N9dFD5KvlkE7BfuAHq95PqEqEoydKtQPeDIZymuY2xw6D5EXmLS9Osjg1qREsTgsiYP3 MkH3DE3r/Ucl8v3bmT/Jn8kDReH9Szi4pVaVCmev6VPuPChxwmeyHIBbixHZ2MiYApWO Cb8Bs9vsVvh7SOMfBiPV0AKYBGTYbjKhXhZg9bfmrSk7sd3sqj7i/DnTczYLT9Agjo++ Dfe+fUmG2RLKNZ4Y248dyugFsDC61CLckDs1ChNVJf/EsBUnZenXUKw2jy4CJP/pz3TA imKA== 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=rOAuJVYIWkpmIQrckoVypqTA68tG+o59WQHGV60wfcw=; b=VPpqxJSf12DBsSNgEp5rcOh4ydK9Kuc/TALuT41aTicQ9u5n4QpceGJArnb/F2c7Kk 9Osjpc3/Rx4aiQkeofZ+7GqqlVKNYoZKgv9nnlBCjPR+vlN0cg+ATQ97h7xe0JCbzaHc PVlad47nrnkrp4JazxQpepIyHai+1jf+ME9lUGmD8/Avpw8w0SYvlEAZ6OZVGFy4SN5B wwSYjp9GNKdZd38zEJ2XaRh6DUWMTXsJpwz96QMbmQLbgKF2Q4WwAs4aih3qu+FYNRvG vp5T/k3hU5oorHq2ZvqEsqUvBqL8CEfg4bYE8fkv1QhIM89pxcIF0qlX3jTIvApbWudR WhFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hbNauST3; 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 p36-20020a635b24000000b003fc5a7db899si27443039pgb.102.2022.06.07.22.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:31:10 -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=hbNauST3; 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 85A2F27898B; Tue, 7 Jun 2022 21:58:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347262AbiFGRi2 (ORCPT + 99 others); Tue, 7 Jun 2022 13:38:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347245AbiFGRaQ (ORCPT ); Tue, 7 Jun 2022 13:30:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89BBB10F353; Tue, 7 Jun 2022 10:26:08 -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 F3036B822B1; Tue, 7 Jun 2022 17:26:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 601BFC385A5; Tue, 7 Jun 2022 17:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622765; bh=GWRc+kAFAjOPErKv+G7Iow1IuvazDj6DgnxCEKcmZ9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hbNauST3jz1RH1mFHE7cLi7WN7xPDofV2fabkKCrGak1y0fc+54NzYhEU5J5pGEIQ gldpyWsgrIrA5y7atmaLqnXcxZLXcn3uYmS2Wi63l+Q1N/9GJ0j19YFo6HXD+Tb8nJ 8xgWXj3XCff18i1grZYdQrEtsZf4usI2CrKoGv4E= 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 175/452] drm/msm/dp: fix error check return value of irq_of_parse_and_map() Date: Tue, 7 Jun 2022 19:00:32 +0200 Message-Id: <20220607164913.776149475@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 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 36caf3d5a9f9..09c8e50da68d 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1147,10 +1147,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