From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v2 net] net: phy: sfp: Fix unregistering of HWMON SFP device Date: Wed, 26 Sep 2018 20:25:08 -0700 (PDT) Message-ID: <20180926.202508.1046388652536435747.davem@davemloft.net> References: <1537833000-23960-1-git-send-email-andrew@lunn.ch> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, rmk+kernel@arm.linux.org.uk, f.fainelli@gmail.com To: andrew@lunn.ch Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:37710 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbeI0JlM (ORCPT ); Thu, 27 Sep 2018 05:41:12 -0400 In-Reply-To: <1537833000-23960-1-git-send-email-andrew@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: From: Andrew Lunn Date: Tue, 25 Sep 2018 01:50:00 +0200 > A HWMON device is only registered is the SFP module supports the > diagnostic page and is complient to SFF8472. Don't unconditionally > unregister the hwmon device when the SFP module is remove, otherwise > we access data structures which don't exist. > > Reported-by: Florian Fainelli > Fixes: 1323061a018a ("net: phy: sfp: Add HWMON support for module sensors") > Signed-off-by: Andrew Lunn Applied.