Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2635934pxa; Mon, 17 Aug 2020 15:04:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx30riQKvsSFDbxTgUNaOZLUOl3cL2sCECXTIfGAYgPUrTFqSvfBp0qakebhcgTo8l42eid X-Received: by 2002:a17:906:b108:: with SMTP id u8mr9118545ejy.249.1597701897420; Mon, 17 Aug 2020 15:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597701897; cv=none; d=google.com; s=arc-20160816; b=XFbgGmqT5/fRupJQGwkAuKUn/iOWUInmAKn5kp6/brHTTUAM5XQx0bovSdPna89qa8 RKQ2bRk9dMelJ2wM5J5wt3+131MeDL3/W6+81JI+hVMsWEL0UvjRwGeJGiathBwRmXCI oIwDytBQLvC16nXZDmu50XGty6FwhjSyoqUl6ih3qVR7OPpXZBOu2eZs2xbPliycl/ya nVSw0mAXv7JaGh0YWmhpm4NuvwxeTeFUxO5FNT94vRYdMSBCTCpBAv2mDHxfIt8z6Pii dUTkYR/vVS28UYar9GC2sjqwzwlmLC6APjU4zalNFAmhatjJ28tdO2XRbiuRDr1AjfYo LAqg== 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=SEF7cFX9E8E6fKgxEyNjrP3QVNTMh6y8qwNd2tH6kf8=; b=MhKtyKSIzoWywreK9KQuL/1ugxvedmbud8uWJ7vf7EzoMIiZNKj6+QYN6cGcbAVTD/ zo+UspDPY2fMWukr1zT3GJrAM1RZjD6bOKuKsR6Np5AK2avWkrgEEzJilBtqwwesIZ4c /CRo7l+b6BGmw5HBkuHSzYDS9MEU0yn4X54mYZa8q7ioWWTDC2setxgLWSbjX4ZaZjZW KchD9ph00gF3a6930ZRr2lGnfulvZ8kLcwZ2SOiUyeUbBRQeoF/TgnwqTAAX2l98EDqZ 6oXSGNVPBl9YQpLvrvLu1DzH13y/B6fG06EZdjYkYKR/K9n0VXs2RAjT177fDNHxighq 9dqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=erC043nc; 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 r10si11651314eds.138.2020.08.17.15.04.33; Mon, 17 Aug 2020 15:04:57 -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=erC043nc; 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 S2387994AbgHQPye (ORCPT + 99 others); Mon, 17 Aug 2020 11:54:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:51594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730771AbgHQPlv (ORCPT ); Mon, 17 Aug 2020 11:41:51 -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 2B3B922CF8; Mon, 17 Aug 2020 15:41:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678910; bh=s2bVGAhZxzkklepQXeBLPTCF0rSqnarv9PWI2eXr2p4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=erC043ncfx3iLDzJbLpDv1emgeFAfNGceO3Gk1PdXyYFqTKB+npTD1/RppO/0S1kr wQZei8w57zx4gHaghQrM4u+/9L1ZzKAi6iOq4BA+SoRdcFRhz8pGzCySommJ6w/4uq 5p1NTacIl17XBsWmdVSkrcIe4SwSCI0LICU9Vkgc= 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.7 032/393] platform/x86: intel-vbtn: Fix return value check in check_acpi_dev() Date: Mon, 17 Aug 2020 17:11:22 +0200 Message-Id: <20200817143821.164685782@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@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 64dd4a5a7d214a07e3d9f40227ec30ac8ba8796e ] 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: 332e081225fc ("intel-vbtn: new driver for Intel Virtual Button") Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- drivers/platform/x86/intel-vbtn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c index a05b80955dcdd..5db8b7ad1f5df 100644 --- a/drivers/platform/x86/intel-vbtn.c +++ b/drivers/platform/x86/intel-vbtn.c @@ -286,7 +286,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-vbtn: created platform device\n"); -- 2.25.1