Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9283989pxu; Mon, 28 Dec 2020 11:21:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzH5SXGe56GKBZB1UNimZCPxCeGjBX6By0K2kZetBkWD8h3voH8Iq5SwovLMBwx1uvm2l5u X-Received: by 2002:a17:906:adcb:: with SMTP id lb11mr41820821ejb.346.1609183286026; Mon, 28 Dec 2020 11:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609183286; cv=none; d=google.com; s=arc-20160816; b=oBzJEaLxLiBHzEH0aapd/PlkuFplvl45UfCDc+wBfN6xIJ98+sTi5sm7bNS/4LApzq wpRH1hFWjv9FjICuXwZxj1MW+zqDv7R60rQ6RtDnc+JRJev2kd6YocGbsji3Ee+fK1Pq zsq0Q4GO1D32C8YQ+1MLvph7BuVIyT0gmc7kyiIc3xQFaTTglBZ+bAaMK0Hto8XTxLYv auNhCXoNFsjiRZYiGZBlBbKeTk2eLt4C7Vono5IJPkbP35cKWQ0EIxM8LrWEG9SGX0X9 Iv0H7sjf6a0EOvAalNnjef+t5SyKWPOUPKv17+FsJMSnMu2j9ZBQAPJgX00pyiGucrUW P1DA== 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=wn9COmaSjwpZdDr8vBqkKWb5F33QExwsfWzDr6sk1tQ=; b=DUeInLDcwcdqc/4jwQRgeVm70URBUSdAFs+NJzaMn+wWCYxtDHsH4gpIgH3m8OvFym KnrKiMib8RnhiF92cO+Xiw3xzDKhURtIkpIBuHayC4QvC7qJzJzpyL/Tqz1YRBwvM+dv n2Dv9meJMIuw3Cbm9RELjlb41W9oCDcYC9dAWckHcXb//AYB+cMVYgCrGE1AoToUuTuu Z+banDLnHr8qGJ5pw8wv545+tMZKs3DGzbOm1W1IyP44nWB9JDowkdzbDMzKDt/bfFno WgKQvruNZw6gV3QzRjR9zyar7DTGjhcs95cQ1QWfz5AyWt25QvkylutiRayB2GVkkxpV 1Khg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t3lpDN+y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si18793196ejw.623.2020.12.28.11.21.04; Mon, 28 Dec 2020 11:21:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t3lpDN+y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407689AbgL1N7s (ORCPT + 99 others); Mon, 28 Dec 2020 08:59:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:33250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407684AbgL1N7m (ORCPT ); Mon, 28 Dec 2020 08:59:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 21BE02064B; Mon, 28 Dec 2020 13:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609163966; bh=+edES7jz8nep5jY75VEaLuUjwmi94DKALngqGFtezi4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t3lpDN+y/Y/Q9/BK/678ntQl14vuKF+QhYGsswq7gpDPPIA6DMsaJbR3LjuAnEMzr LvoPiRB0MylsL5pkx1qSz1252Tx/IZvgWs2lEqYi3G1MOD/2bFHIU8VoxvzAh0Lp39 pY9sKE2yQ6OV8RyTm2+FpkM0g71yNe+enwBoe1zo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Linus Walleij , Sam Ravnborg , Sasha Levin Subject: [PATCH 5.10 006/717] drm/tve200: Fix handling of platform_get_irq() error Date: Mon, 28 Dec 2020 13:40:04 +0100 Message-Id: <20201228125021.288843512@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski [ Upstream commit 77bb5aaf2bb8180e7d1bb70b4df306f511707a7d ] platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200") Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200827071107.27429-2-krzk@kernel.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/tve200/tve200_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index c3aa39bd38ecd..b5259cb1383fc 100644 --- a/drivers/gpu/drm/tve200/tve200_drv.c +++ b/drivers/gpu/drm/tve200/tve200_drv.c @@ -200,8 +200,8 @@ static int tve200_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (!irq) { - ret = -EINVAL; + if (irq < 0) { + ret = irq; goto clk_disable; } -- 2.27.0