From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] net: marvell: fix a missing check of acpi_match_device Date: Thu, 27 Dec 2018 16:27:12 -0800 (PST) Message-ID: <20181227.162712.705546628469200285.davem@davemloft.net> References: <20181226063117.75646-1-kjlu@umn.edu> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: pakki001@umn.edu, antoine.tenart@bootlin.com, maxime.chevallier@bootlin.com, ymarkman@marvell.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: kjlu@umn.edu Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:52044 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727527AbeL1A1N (ORCPT ); Thu, 27 Dec 2018 19:27:13 -0500 In-Reply-To: <20181226063117.75646-1-kjlu@umn.edu> Sender: netdev-owner@vger.kernel.org List-ID: From: Kangjie Lu Date: Wed, 26 Dec 2018 00:31:08 -0600 > When acpi_match_device fails, its return value is NULL. Directly using > the return value without a check may result in a NULL-pointer > dereference. The fix checks if acpi_match_device fails, and if so, > returns -EINVAL. > > Signed-off-by: Kangjie Lu Applied.