Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9284250pxu; Mon, 28 Dec 2020 11:21:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLi8+HYFDbMN/I8GzmEtUeUkJX9IOB8XHLNFaN4HMM1A3+tSTUjVOaqnPWVhISMdUdiYwO X-Received: by 2002:a17:906:3593:: with SMTP id o19mr42258176ejb.377.1609183317857; Mon, 28 Dec 2020 11:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609183317; cv=none; d=google.com; s=arc-20160816; b=HYpy7wKGhnY9l7a1ZwV/IL8VQDMIOuPqSrJwjNmTBI7M/gWs5SIJYlJ5llzKm/0ccH ESsHzrz43yVMJvZcxqQy2PgDVq5NeWHfQZkSORfn2EK9mtrF7Ct8VxefmHKRquIeo625 JZmYC3SANQ6rFlAYk/ehQF9Lh/6jM3dx1a/yuOOxkuYSnbF4QVccL2Zb7BTCz/blOKob o27D/PHhplO8OW1xYb3G7pGhhV+NQz19bW4063BYMprbvpi3ZicEa30ZM3nnA/pNk2Wk enuny1ZPF7stVC00AzOqRPR9dlcz366Ra+S3LD7TecT3ezSsejYvOOfXBWlChRZOQ4l8 Hlhw== 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=IQocoBvhlB2P0293KVYGnpYW9gaOzY5zLylvFEiRvDQ=; b=oTBaYRxRdMLAZSpJGhlyrfO5Ymn/XkjjHxuYbqkGQWvkfFqy6hXDeuMtTmsTjmYYbS EjC8F0Q9OIFdxIkCSGv/9jL0t2K02jNdkUwY5QW48pshCWlMcRMYtyStGr6hnKNc0pH2 aJIydu66U9ZjhRx2/00tso8jhh3utD17OXgUy1yLw2b0BrZ4TajQ/rx2pmemn9pbJP2y Gvhpk7l0bULHcgT14UbuJNjT1elwYtQtIMmnvyC3gCBVDAs7LAAMMVNAhPv4Zvlr382q DVBc14CqTYfwcYr/Pkgv4ZEA0n9vqaqRD7rwFe6AdgcT/mwU8x+7ljGIZ98BhbuHenqn Atiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=badrfQr4; 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 97si20827493edr.29.2020.12.28.11.21.35; Mon, 28 Dec 2020 11:21:57 -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=badrfQr4; 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 S2407785AbgL1OAH (ORCPT + 99 others); Mon, 28 Dec 2020 09:00:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:33852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388142AbgL1OAE (ORCPT ); Mon, 28 Dec 2020 09:00:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5AA1922583; Mon, 28 Dec 2020 13:59:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609163963; bh=jsR4YepOQvPa4iBNPHuoPd1qCWu7x9H2/OUePiphl0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=badrfQr4ylu75aHuKL78HqWNk4Lo37x+jAFaVxjUW1fYIsttpS96E64REdfpHuwW9 XqW1ZENM3FOpCixjJ8cZ2t3CDzCe5jVP2lgVemkLDnbF8ouL7HLJkYuqjtdKq7tGXx qD1gMuJDG096WXTnVu47AhazURrnrSOqddQ88kdw= 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 005/717] drm/mcde: Fix handling of platform_get_irq() error Date: Mon, 28 Dec 2020 13:40:03 +0100 Message-Id: <20201228125021.240180180@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 e2dae672a9d5e11856fe30ede63467c65f999a81 ] platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200827071107.27429-1-krzk@kernel.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/mcde/mcde_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index 92f8bd907193f..210f5e1630081 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -331,8 +331,8 @@ static int mcde_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