From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH v2 net] net: phy: sfp: Fix unregistering of HWMON SFP device Date: Mon, 24 Sep 2018 16:51:17 -0700 Message-ID: <4489d103-9aa6-3895-e62a-b50587a26776@gmail.com> References: <1537833000-23960-1-git-send-email-andrew@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev , Russell King To: Andrew Lunn , David Miller Return-path: Received: from mail-ed1-f66.google.com ([209.85.208.66]:42406 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725745AbeIYF4F (ORCPT ); Tue, 25 Sep 2018 01:56:05 -0400 Received: by mail-ed1-f66.google.com with SMTP id l5so17758563edw.9 for ; Mon, 24 Sep 2018 16:51:22 -0700 (PDT) In-Reply-To: <1537833000-23960-1-git-send-email-andrew@lunn.ch> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 09/24/2018 04:50 PM, Andrew Lunn wrote: > 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 Tested-by: Florian Fainelli -- Florian