Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2664811pxa; Mon, 17 Aug 2020 15:58:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxt4RuYJT1OhK0wb9AhI6OgGiBgaQD1sT4uvFKlAUfeCS3DqvZFuzfeeeOsuk39KZJ5mj/A X-Received: by 2002:a17:906:e10e:: with SMTP id gj14mr18211973ejb.218.1597705096001; Mon, 17 Aug 2020 15:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597705095; cv=none; d=google.com; s=arc-20160816; b=EhW7GoVB0zjjlpWM+nkzGZQoPhCme/SFeJUQh1fZicZdIIQ2ESxhh1ieTS2viqsvwQ kahx5581LKvl3YdWqqHkSdLiKeXVNBpXaYc0r0StGCLRZ7VURaoEpbvT6dVY/Ck0McdJ UkQlFVShs34dQ/6YoLRXJdpJe75F4XWOqADAgTkfHATHtr9oA+BboCe3G9kvmg77MH5W HzkWcFAqmzMjgmi8lLdmItaySkVrYIB7yq50m9+sPGC3sSBqaoAsHGSXJsGeApaK9nyW IqwhVgmYJoqE7Thg9vhe7G5nTUBenpyTILAT7yNhDz0bST+ouJg7Q53UVsmzae2smoEO MXhg== 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=zo87gv4DaczidoUE1TXIBTSW09/3L885g16o/Z5wVJM=; b=XWU6ue8newVmCchJZGDf9AAsrmuhcRpwHTEMIDYoX06pCjLBu/1DJp1oI+f5K299ax 7GOHTfLe579cB3rJP5vFYQDjWaf9E+5+25rMDNokGoKofLnhoGd3LyLQRLJjCqVYdc7s LCjWqKmPl1PlSIDfpeyJOO/7Z21TNki+QVmTEHMzqX2wWEw59CZpw/xWzHt6YPrSBzLY +pqMHKnihY9veZcdGeCdEq50AQjEP2IdI6LKsIhTrsWLGOhlheCx5tNuWtf3IpC6NT9G vqm8sedJXwuqmWQ+j+5T5xifV8xT0idTANDebE40lObjSNNlvm4TwqinjhCIXbTL6cqi rozg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="FVtvT/UD"; 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=fail (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 g22si11781448edm.555.2020.08.17.15.57.52; Mon, 17 Aug 2020 15:58:15 -0700 (PDT) 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=@kernel.org header.s=default header.b="FVtvT/UD"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729574AbgHQTtz (ORCPT + 99 others); Mon, 17 Aug 2020 15:49:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:41320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729217AbgHQPTm (ORCPT ); Mon, 17 Aug 2020 11:19:42 -0400 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 819CB2072E; Mon, 17 Aug 2020 15:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597677582; bh=VMTzMSs96rd2ubqGPcpihfRojvQiew/VEzVXjzbGrYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FVtvT/UDyzrhl0/ZOi1ARDgYZ7u+CmPrxvUDjZOriliSGsTgD6WnXtX9Q/h1AF/CW Eh+CqN8AFSCZtryp/2PbEwM5WnhZ/HUv1xP4rftz2veSn6859HSKsQO076oUhNcdSv /7vwHO66CeAZcMRbo4ERmvWKruSGUSG7GeTOzW2c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Lu Wei , Andy Shevchenko , Sasha Levin Subject: [PATCH 5.8 034/464] platform/x86: intel-hid: Fix return value check in check_acpi_dev() Date: Mon, 17 Aug 2020 17:09:47 +0200 Message-Id: <20200817143835.389868594@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@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: Lu Wei [ Upstream commit 71fbe886ce6dd0be17f20aded9c63fe58edd2806 ] In the function check_acpi_dev(), if it fails to create platform device, the return value is ERR_PTR() or NULL. Thus it must use IS_ERR_OR_NULL() to check return value. Fixes: ecc83e52b28c ("intel-hid: new hid event driver for hotkeys") Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- drivers/platform/x86/intel-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c index 9ee79b74311c1..86261970bd8f3 100644 --- a/drivers/platform/x86/intel-hid.c +++ b/drivers/platform/x86/intel-hid.c @@ -571,7 +571,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv) return AE_OK; if (acpi_match_device_ids(dev, ids) == 0) - if (acpi_create_platform_device(dev, NULL)) + if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL))) dev_info(&dev->dev, "intel-hid: created platform device\n"); -- 2.25.1