Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp782070rwb; Thu, 19 Jan 2023 02:36:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXtdVBjh4C8ktwnDTfP5Bo2av0QHw1N9Xo8KOBsaDMSJcP7bApGjahhG+ONC8mtQXKIVXcBZ X-Received: by 2002:a17:90a:86cb:b0:229:8344:2a65 with SMTP id y11-20020a17090a86cb00b0022983442a65mr10388862pjv.20.1674124576145; Thu, 19 Jan 2023 02:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674124576; cv=none; d=google.com; s=arc-20160816; b=vQYZHnczHhu8ZT9/C8p674/y2Bym/ke8ZO5KtGlzYwtWviTOXNkDiZrOBu8EYbLgJp XJfh9qtv9HnJSKIopvolD2QTA+t/WO97OXvdk6pWoUgKmi17zdPIOBMcwoF2k9rRkTGc x+Sb6l2XfhlkxfdNPi6z61cMqj/kIPGTF3ccLVu7WIT843DEssZ2LC/vdOatDH80BNNQ ImM0Eo8SjFr4TP59HanCVtvO24QuJjnCrfzemP6sIRwylEU0ape3Jv5xhflBCf4weiJr oYcuXwNcvLSGZ2clBaAZ4Emg6kv6aPqGf5IJjTBzf4eJMp+bHA6sJAsRZl8MlgK9hCC4 QXJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=MUCXN8xlafDZe9KujQuaTfnC0kLUreeCHGM7TrkOeWU=; b=dRGwwjp3u1szHgo+it6ezabrv2U2TQDCVxguCCJpZ46Fvqy2wn1dcoStU9gwhLLB96 9Fq5l9fabc5oJCLu7k57zzjqIcZp4jRn7hFAUzvLE8x8Cf8MJgLEUVUW7VcD0purcuTr aeTUWa799wRZh3/8NEjjYzzUYMhM4Zoh4OipiL/KIosxDDlN+sbo04rkC/ypL4a2zObH 8sxE/OLH4epYW8ALEIrhBxEnOS6byS3Nq1TZfzMDC8cl/OMIWsvIGUpIpuk1koMoeY6t rVVwtypiVvGA+Zuz5oW+FC1d3Jf921FbguJQLNtoXMqREsXf0gLg04Dz3bFUaCVOTxMm 2xZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IrDZpi7R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn8-20020a17090b38c800b00225eb9af940si4812990pjb.183.2023.01.19.02.36.10; Thu, 19 Jan 2023 02:36:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IrDZpi7R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230122AbjASKab (ORCPT + 44 others); Thu, 19 Jan 2023 05:30:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbjASKa3 (ORCPT ); Thu, 19 Jan 2023 05:30:29 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66CE81715C; Thu, 19 Jan 2023 02:30:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 035786150E; Thu, 19 Jan 2023 10:30:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE4F0C433D2; Thu, 19 Jan 2023 10:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674124226; bh=vqOBLxIix8agYyJCUe57zrHZuDz3W1dqgfbKszEXMp4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=IrDZpi7RNhRpg08IjCtsxja0wZ8BXeMaaTrSTWAzIYW7zRqJaqUUMn96i5UoF/cgb hGZMFGwv/gBA811iC1JHpgR3FzPJ6Z4d7mijNQgIUOI6WjQCmAGUqemmAebS+OTctM CLNIKOBs/2nYfxF3/KnX1PhqU8ShisReATUE3EHr2i/wMXxlLmFSoXB7GDTJk7xK4T X9KmOVcO9FnxiVdPEthwE9kxXS/HE+Betfx5eeLY52uOZNGbYlx/9/OQx5vincEPTd YeRtvBrWRXC4b1EZ3O17WoSmnOWN2GaVDlqBE0NOSCY1Jjss2rj2sqggxJacLeGgGR K3UFMtnaJp2vA== Message-ID: Date: Thu, 19 Jan 2023 12:30:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH net-next] net: ethernet: ti: am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY Content-Language: en-US To: Siddharth Vadapalli , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, linux@armlinux.org.uk, pabeni@redhat.com, geert@linux-m68k.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srk@ti.com References: <20230118112136.213061-1-s-vadapalli@ti.com> From: Roger Quadros In-Reply-To: <20230118112136.213061-1-s-vadapalli@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/01/2023 13:21, Siddharth Vadapalli wrote: > In the am65_cpsw_init_serdes_phy() function, the error handling for the > call to the devm_of_phy_get() function misses the case where the return > value of devm_of_phy_get() is ERR_PTR(-EPROBE_DEFER). Proceeding without > handling this case will result in a crash when the "phy" pointer with > this value is dereferenced by phy_init() in am65_cpsw_enable_phy(). > > Fix this by adding appropriate error handling code. > > Reported-by: Geert Uytterhoeven > Fixes: dab2b265dd23 ("net: ethernet: ti: am65-cpsw: Add support for SERDES configuration") > Suggested-by: Geert Uytterhoeven > Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros