Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A39E2C43387 for ; Wed, 16 Jan 2019 14:22:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 733BE205C9 for ; Wed, 16 Jan 2019 14:22:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="sx3gxzQ9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391283AbfAPOWz (ORCPT ); Wed, 16 Jan 2019 09:22:55 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:45248 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730649AbfAPOWy (ORCPT ); Wed, 16 Jan 2019 09:22:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=zasZnJbMrkcjWKYBL6sY5pe7YEa2uok0R5nivjxGUwM=; b=sx3gxzQ97d4/Xh8O4pSLXB5wlqxVFvIFPulqe9ehsXwB25tKobJ4WQMSyO5W9RAXgXg7icOdBrnqdXo2EmMPvLAvpoYUbMlhh8NhHDHBmGzPWqVziyNODQg8IOd3Ar8djk5S1AEyRYoThb2bwOqtrXvSyjYNusTBF3gekXxlAZ0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gjm5j-00074i-54; Wed, 16 Jan 2019 15:22:51 +0100 Date: Wed, 16 Jan 2019 15:22:51 +0100 From: Andrew Lunn To: Heiner Kallweit Cc: Florian Fainelli , David Miller , "netdev@vger.kernel.org" Subject: Re: [PATCH v2 net-next] net: phy: check return code when requesting PHY driver module Message-ID: <20190116142251.GB25731@lunn.ch> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jan 16, 2019 at 08:07:38AM +0100, Heiner Kallweit wrote: > When requesting the PHY driver module fails we'll bind the genphy > driver later. This isn't obvious to the user and may cause, depending > on the PHY, different types of issues. Therefore check the return code > of request_module(). Note that we only check for failures in loading > the module, not whether a module exists for the respective PHY ID. > > v2: > - add comment explaining what is checked and what is not > - return error from phy_device_create() if loading module fails > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew