Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5990327ybc; Wed, 27 Nov 2019 13:01:33 -0800 (PST) X-Google-Smtp-Source: APXvYqy28TSC4hBPrJ/LQ+h5EoSr36lMw/UlilFFRFx0rcAELPrJ2mAj7+EQn4+zzS/G7PHs147M X-Received: by 2002:a50:9e22:: with SMTP id z31mr9229583ede.258.1574888493509; Wed, 27 Nov 2019 13:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888493; cv=none; d=google.com; s=arc-20160816; b=zSyjyC6RJ8qOHfSImTZ6/QdyYkg0nIaQ4BHcVCZjcS/+j6vAX0kt7ZaX2VBaJg95Bx ZCo9TwW/rQl+c9feYHyAAgy8YgvNFwY1WFjPX0NdrJEuuKwuoBV4NIGpdRLq7ELNPELb inPy4+l2d3VPvG6eyXLjXwg5tm+dZfwYP9+SBMg76yPWcszLD4mfYu72nmppWAjTKXBB fojoEC/UaX0RUlgKvnBj6CccC5/X56MvETOQoe/OpYTesgHewvE8H8uO3BbewpZtNq7s pe7vZDMIrE0U5CuZFsmM7kvjFyM/NN9jYfCnV1pvILhL7DeM671tzOdQwAVRgAeXIJG1 Ds+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4aha3ALmAgR4Y9Al1KFU/YD8Fx+KorBBpoF4m5wRUtI=; b=J50NOo+NRNfDowBQfI94FkI8LEc52JDtQJhT8rmsdDC3aNQe01JIREJ1ovv5ilI5sg 6uO36X6IH3rfIUJaYn2ppGXaMPGgTASMibbPhiCcruVXdcj89bNDg/ru3yjx1319gzeq DflpLWrb1UFh30TfLZ70GWVSuEnelGiAV3dMbPucKpxTzJnTjvyY3ENa5+uo+bZfV9BG OxywJ5uILZ/Nasf0hUFmoJUPkreqohMCLq4DQE5xmKnjdHIBn0AZHoX4aq4ycsWfEfgF v5aHzygnv+vJ4xj2M4ZeVBTrV800Cc0E+8iSbPDXxnC4JmLZcnMe23xSa2WbKAV5nXwT t4iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OIXVxAte; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si13115202edk.210.2019.11.27.13.01.09; Wed, 27 Nov 2019 13:01:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OIXVxAte; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731524AbfK0VAH (ORCPT + 99 others); Wed, 27 Nov 2019 16:00:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:51808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731517AbfK0VAF (ORCPT ); Wed, 27 Nov 2019 16:00:05 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6060921582; Wed, 27 Nov 2019 21:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888404; bh=TA8Ib/PAXrfuG0ERBmHA7nW7Qdqb2UTASotXuegXicU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OIXVxAte9CumNMV+A5tLhWZ4rSmkdyildFNTn19JPkfK/q1OG21itBV8iGik8IekJ AcAJXDTxeGpNQ1FCk2MPzgcw/GheQOJKMQKpo+hh60tpgWPbS4Ib/byar1ZyDh70HA gV41ZSfayXMAgpA3d60RY+kFqhH+eHdNrP2QmfjU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Miquel Raynal , Eduardo Valentin , Sasha Levin Subject: [PATCH 4.19 121/306] thermal: armada: fix a test in probe() Date: Wed, 27 Nov 2019 21:29:31 +0100 Message-Id: <20191127203123.980490599@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit d1d2c290b3c04b65fa6132eeebe50a070746d8f6 ] The platform_get_resource() function doesn't return error pointers, it returns NULL on error. Fixes: 3d4e51844a4e ("thermal: armada: convert driver to syscon register accesses") Signed-off-by: Dan Carpenter Reviewed-by: Miquel Raynal Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin --- drivers/thermal/armada_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index e16b3cb1808c5..1c9830b2c84da 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -526,8 +526,8 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev, /* First memory region points towards the status register */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (IS_ERR(res)) - return PTR_ERR(res); + if (!res) + return -EIO; /* * Edit the resource start address and length to map over all the -- 2.20.1