Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbdDHPPI (ORCPT ); Sat, 8 Apr 2017 11:15:08 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:40176 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbdDHPPB (ORCPT ); Sat, 8 Apr 2017 11:15:01 -0400 Date: Sat, 08 Apr 2017 08:14:59 -0700 (PDT) Message-Id: <20170408.081459.254155739436767702.davem@davemloft.net> To: colin.king@canonical.com Cc: jakub.kicinski@netronome.com, simon.horman@netronome.com, oss-drivers@netronome.com, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][-next] nfp: don't dereference a null nn->eth_port to print a warning From: David Miller In-Reply-To: <20170406125435.18898-1-colin.king@canonical.com> References: <20170406125435.18898-1-colin.king@canonical.com> X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 08 Apr 2017 07:33:42 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 570 Lines: 16 From: Colin King Date: Thu, 6 Apr 2017 13:54:35 +0100 > From: Colin Ian King > > On the case where nn->eth_port is null the warning message > is printing the port by dereferencing this null pointer. > Remove the deference to avoid a crash when printing the > warning message. > > Detected by CoverityScan, CID#1426198 ("Dereference after null check") > > Fixes: ce22f5a2cbe3c627 ("nfp: separate high level and low level NSP headers") > Signed-off-by: Colin Ian King Applied, thanks.