From patchwork Thu Jun 29 19:14:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13297221 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E15314284 for ; Thu, 29 Jun 2023 19:17:50 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A790468B for ; Thu, 29 Jun 2023 12:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688066268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CB4F2eDO1VL92Q0HqzTksbw7n9fujtKb1FZPPsN/d0c=; b=BqpD4ZwMzYZmpIJ45DfkxUtfb6EFY/wUovblgtb4/RWR9jwNEyvj2jNzIpKyYnEZETM4sQ 6Y1Zn0/78sSfVelNKxLcfN24j4Pbo1Bvo8oXo1fbYvpJy8nm0mxVf+YpQ6k54PNHJvwA7G kMonJ0IdMCIJic14np/lWmUqJ+sIpQk= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-662-60W8ZwAzNSuTwo9O_um8jA-1; Thu, 29 Jun 2023 15:17:46 -0400 X-MC-Unique: 60W8ZwAzNSuTwo9O_um8jA-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-57003dac4a8so15103627b3.1 for ; Thu, 29 Jun 2023 12:17:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688066266; x=1690658266; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CB4F2eDO1VL92Q0HqzTksbw7n9fujtKb1FZPPsN/d0c=; b=IbL/AathB3/MbCXTQrfBIyTBGHuuYgRbuXH5B35mdPx7GdwAX9x74nzQWxib+UVsSL 6c9ykTlLidyrCvZXsA4I23Yoik6Y9CcalagonlyJ+nhM3wllmkJ4v01au+WemLMUlwrv lRCrJ83PwNVd01tKrMK8tw2AZCSXyV+7InnsPGGsvecOTx4ALmfS2i1QIxrKz+6Hxz1u 5XfaTadQ88mIcGQEnnx89IK2oR4lBQuTnAN4wT4dOyagit6stuiYleHVOTWsXvIYzffZ T4pkjvEQH8/RwlFufgNCgy5hvmp2OhbZcUGzJ6VRK9DD5y/8E5fy950ZEKA3mes3vPjY LllA== X-Gm-Message-State: ABy/qLYjdOgKNCQwvHaY6QILEugP2QdS041nhlLgPDygJbFz44XKO2W4 GVvVv1v8per2OGw/q74k18UoWkS14AKFmxlKOGtwf0N0YIwVQu/aZPrJK1/aAlEbjJbUqHvJYXn b4FCK8O8ss/nj61bm X-Received: by 2002:a81:a04a:0:b0:56c:e260:e2d5 with SMTP id x71-20020a81a04a000000b0056ce260e2d5mr6808615ywg.7.1688066266282; Thu, 29 Jun 2023 12:17:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOfhrwZ9iRh4ReGxdsfikEqHuYNT4UdGjpezi+NU1/qUuJa+z/QJduR3WvMUh9O98fjlkVHg== X-Received: by 2002:a81:a04a:0:b0:56c:e260:e2d5 with SMTP id x71-20020a81a04a000000b0056ce260e2d5mr6808604ywg.7.1688066266038; Thu, 29 Jun 2023 12:17:46 -0700 (PDT) Received: from halaney-x13s.redhat.com ([2600:1700:1ff0:d0e0::22]) by smtp.gmail.com with ESMTPSA id w127-20020a0ded85000000b0057085b18cddsm3052478ywe.54.2023.06.29.12.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 12:17:45 -0700 (PDT) From: Andrew Halaney To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, mcoquelin.stm32@gmail.com, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, davem@davemloft.net, joabreu@synopsys.com, alexandre.torgue@foss.st.com, peppe.cavallaro@st.com, bhupesh.sharma@linaro.org, vkoul@kernel.org, bartosz.golaszewski@linaro.org, Andrew Halaney Subject: [PATCH 1/3] net: stmmac: dwmac-qcom-ethqos: Return device_get_phy_mode() errors properly Date: Thu, 29 Jun 2023 14:14:16 -0500 Message-ID: <20230629191725.1434142-1-ahalaney@redhat.com> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Other than -ENODEV, other errors resulted in -EINVAL being returned instead of the actual error. Signed-off-by: Andrew Halaney --- drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index e62940414e54..3bf025e8e2bd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -721,6 +721,9 @@ static int qcom_ethqos_probe(struct platform_device *pdev) return -ENOMEM; ethqos->phy_mode = device_get_phy_mode(dev); + if (ethqos->phy_mode < 0) + return dev_err_probe(dev, ethqos->phy_mode, + "Failed to get phy mode\n"); switch (ethqos->phy_mode) { case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII_ID: @@ -731,8 +734,6 @@ static int qcom_ethqos_probe(struct platform_device *pdev) case PHY_INTERFACE_MODE_SGMII: ethqos->configure_func = ethqos_configure_sgmii; break; - case -ENODEV: - return -ENODEV; default: return -EINVAL; } From patchwork Thu Jun 29 19:14:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13297222 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2069714A83 for ; Thu, 29 Jun 2023 19:18:03 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBEE14698 for ; Thu, 29 Jun 2023 12:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688066280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IdunTKBXq26vcyYb/EdIVE7YvQRq/YPpQ2jK2C3l7sY=; b=WNGs4pJo1jxyZRhG3BUw9EpZ+AJVi45QgGXlmOP8T49CxpIWQ0Nh/FNOSl77rQ6HVXj+WP xrzX22pLmcAenahMNK6VxgKfp28P19/5t0KRQhMvjq7hY4SB2pUSbgO7pWffOLw/V39zve ahGNSlWdGZZvegnjkkzd8J5b8Eyj+N8= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-222-ukSdxPstNIqPoAdQp8ycow-1; Thu, 29 Jun 2023 15:17:58 -0400 X-MC-Unique: ukSdxPstNIqPoAdQp8ycow-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-5704e551e8bso8704267b3.3 for ; Thu, 29 Jun 2023 12:17:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688066278; x=1690658278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IdunTKBXq26vcyYb/EdIVE7YvQRq/YPpQ2jK2C3l7sY=; b=FW8q4VYXbh9XW07aFLq8Yp8kV25HAdPH89CLAYXGoRq41VMWmqnjHZaDH31JpU3GFU y6+jRXE9teOkCsPiwG45vmRAZwOsyT5uyqyXOJim/d3r+bAiXu0PrjZ3lzw/71wCSu8c nvqIgD86qvlcNqIvfszIIN97yXizfJzTMagU3+rWmamSywOwQzD9jvcmaDYYxy2Zu84G 0ggQ6vyxSxT4+BuODdaQrtPMgFV8qf0gcvXSGOyRuSZXpYDZWM+9ePcmnfOkDU82X/7n fsx43PaBUqshKJtJmSmorScqGexC5RttK1IwM6ItIvWyL3H6SRDLJ95/iY0t1rvBpBOP pe9Q== X-Gm-Message-State: ABy/qLbER80NNQeCAeg7qEZawJgSVpF2RUxt7C9EILEnvblVPAhxGDS+ ff/sUMlVbox1x1MJr6vfiDX9HQIgNEOfrqqRjZnD/DYTBry9ELzAFWeKgsfwJbSluv7/cIQ4FL9 5dq4woZLk5xPtTLr6 X-Received: by 2002:a0d:f2c4:0:b0:570:6fbd:2daf with SMTP id b187-20020a0df2c4000000b005706fbd2dafmr303066ywf.37.1688066278443; Thu, 29 Jun 2023 12:17:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGWPYjej9cDTBj9PaobIHZOXCIJHkmLixBjf5KfzXTvWmIZX19PFv5oYzbDnjlXG204DfghIQ== X-Received: by 2002:a0d:f2c4:0:b0:570:6fbd:2daf with SMTP id b187-20020a0df2c4000000b005706fbd2dafmr303048ywf.37.1688066278207; Thu, 29 Jun 2023 12:17:58 -0700 (PDT) Received: from halaney-x13s.redhat.com ([2600:1700:1ff0:d0e0::22]) by smtp.gmail.com with ESMTPSA id w127-20020a0ded85000000b0057085b18cddsm3052478ywe.54.2023.06.29.12.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 12:17:57 -0700 (PDT) From: Andrew Halaney To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, mcoquelin.stm32@gmail.com, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, davem@davemloft.net, joabreu@synopsys.com, alexandre.torgue@foss.st.com, peppe.cavallaro@st.com, bhupesh.sharma@linaro.org, vkoul@kernel.org, bartosz.golaszewski@linaro.org, Andrew Halaney Subject: [PATCH 2/3] net: stmmac: dwmac-qcom-ethqos: Use dev_err_probe() Date: Thu, 29 Jun 2023 14:14:17 -0500 Message-ID: <20230629191725.1434142-2-ahalaney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230629191725.1434142-1-ahalaney@redhat.com> References: <20230629191725.1434142-1-ahalaney@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Using dev_err_probe() logs to devices_deferred which is helpful when debugging. Signed-off-by: Andrew Halaney Reviewed-by: Andrew Lunn --- drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 3bf025e8e2bd..a40869b2dd64 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -710,8 +710,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev) plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac); if (IS_ERR(plat_dat)) { - dev_err(dev, "dt configuration failed\n"); - return PTR_ERR(plat_dat); + return dev_err_probe(dev, PTR_ERR(plat_dat), + "dt configuration failed\n"); } plat_dat->clks_config = ethqos_clks_config; From patchwork Thu Jun 29 19:14:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13297223 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AD4914A83 for ; Thu, 29 Jun 2023 19:18:08 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3BF946B1 for ; Thu, 29 Jun 2023 12:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688066286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YCceMk07Z77c7iGv0vMNdhiFvW89N91YRXanb/xg6cQ=; b=dbw/GRy/ppvpcrIJA+UvpmnK6mnlb3nyXjJWy7e6uWDAFlLPO/XIM16tbm5SXUYXyFFOmn TBBFNM4TzRt6BKcGc1ChNB/JAIdEvmp+rG2lX8wWDwo3+X2pl6hrSM5bhMRvGq6PYXOExJ KPbx5OtuIfrADZPNfOSvF5hIjLIDYWw= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-18-rzJPCfB3Mg-n26HMTUwV8w-1; Thu, 29 Jun 2023 15:18:04 -0400 X-MC-Unique: rzJPCfB3Mg-n26HMTUwV8w-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-57059f90cc5so8892807b3.0 for ; Thu, 29 Jun 2023 12:18:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688066284; x=1690658284; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YCceMk07Z77c7iGv0vMNdhiFvW89N91YRXanb/xg6cQ=; b=l0AGLDpYtXW50X/2AmBeQLp7ec6d1AyZVGgIzw1FQDUQFU0hivR9focE43bBnAJEtT f30kZM/N2GZb+K1Z/v6HzisXyYZtintP2hF7bSYnFlmbSMYY7Tuv2bXsTvV1IquDvnkR YCQNmT2maVaCabdHZOvvYoMAcLJRq2H33RdWnQij2AdKlITgrNfr7FyK63KxCpVGySyI ivWkZso+n42lTWP5cXYOuJOpD5dwKI+QoC8P7Q5G9QrhHJLUMsU1bN17xvC+qSu+zOJG ux9B0bkzUdHWgTzBr0VwrIUkTBvjvKEQ/RoqRJAkiw74QnIkmGefT5my5izDkAlIbMcG owHg== X-Gm-Message-State: ABy/qLb2WM3zBN/cgBbYFcanxO7H/p1DbZd2taETaPIGMGJDmx8w6wEe H1giRNqzukgMhSb+YqxHlUK9zJOxDDTNAmangM91SAk3ptAruVrAch/TwNRx2YNARTfCDsKWdP0 lMPvYpohBjYUxJ7MO X-Received: by 2002:a81:88c7:0:b0:56d:43bd:5513 with SMTP id y190-20020a8188c7000000b0056d43bd5513mr352221ywf.5.1688066284373; Thu, 29 Jun 2023 12:18:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGdHXzFMRozd6nGxf58W0Xv/QopKQ9WchA/okhijXMBtBl5YPN9hN+ACX/VQ9/Q0R3vF2Wxng== X-Received: by 2002:a81:88c7:0:b0:56d:43bd:5513 with SMTP id y190-20020a8188c7000000b0056d43bd5513mr352198ywf.5.1688066284148; Thu, 29 Jun 2023 12:18:04 -0700 (PDT) Received: from halaney-x13s.redhat.com ([2600:1700:1ff0:d0e0::22]) by smtp.gmail.com with ESMTPSA id w127-20020a0ded85000000b0057085b18cddsm3052478ywe.54.2023.06.29.12.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 12:18:03 -0700 (PDT) From: Andrew Halaney To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, mcoquelin.stm32@gmail.com, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, davem@davemloft.net, joabreu@synopsys.com, alexandre.torgue@foss.st.com, peppe.cavallaro@st.com, bhupesh.sharma@linaro.org, vkoul@kernel.org, bartosz.golaszewski@linaro.org, Andrew Halaney Subject: [PATCH 3/3] net: stmmac: dwmac-qcom-ethqos: Log more errors in probe Date: Thu, 29 Jun 2023 14:14:18 -0500 Message-ID: <20230629191725.1434142-3-ahalaney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230629191725.1434142-1-ahalaney@redhat.com> References: <20230629191725.1434142-1-ahalaney@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org These are useful to see when debugging a probe failure. Signed-off-by: Andrew Halaney --- .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index a40869b2dd64..d792b7dd9fc3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -706,7 +706,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ret = stmmac_get_platform_resources(pdev, &stmmac_res); if (ret) - return ret; + return dev_err_probe(dev, ret, + "Failed to get platform resources\n"); plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac); if (IS_ERR(plat_dat)) { @@ -735,13 +736,16 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos->configure_func = ethqos_configure_sgmii; break; default: + dev_err(dev, "Unsupported phy mode %s\n", + phy_modes(ethqos->phy_mode)); return -EINVAL; } ethqos->pdev = pdev; ethqos->rgmii_base = devm_platform_ioremap_resource_byname(pdev, "rgmii"); if (IS_ERR(ethqos->rgmii_base)) - return PTR_ERR(ethqos->rgmii_base); + return dev_err_probe(dev, PTR_ERR(ethqos->rgmii_base), + "Failed to map rgmii resource\n"); ethqos->mac_base = stmmac_res.addr; @@ -753,7 +757,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos->link_clk = devm_clk_get(dev, data->link_clk_name ?: "rgmii"); if (IS_ERR(ethqos->link_clk)) - return PTR_ERR(ethqos->link_clk); + return dev_err_probe(dev, PTR_ERR(ethqos->link_clk), + "Failed to get link_clk\n"); ret = ethqos_clks_config(ethqos, true); if (ret) @@ -765,7 +770,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ethqos->serdes_phy = devm_phy_optional_get(dev, "serdes"); if (IS_ERR(ethqos->serdes_phy)) - return PTR_ERR(ethqos->serdes_phy); + return dev_err_probe(dev, PTR_ERR(ethqos->serdes_phy), + "Failed to get serdes phy\n"); ethqos->speed = SPEED_1000; ethqos_update_link_clk(ethqos, SPEED_1000);