summaryrefslogtreecommitdiff
path: root/drivers/phy/phy-can-transceiver.c
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2023-02-14 16:55:45 +0300
committerVinod Koul <vkoul@kernel.org>2023-02-14 16:55:45 +0300
commit4315eab7054d15db50265ab249b7f87912b49902 (patch)
tree9ac1b0133574ca73910ac642e6be461e1a710882 /drivers/phy/phy-can-transceiver.c
parent4ca651df07183e29cdad7272255e23aec0169a1b (diff)
parentbc30c15f275484f9b9fe27c2fa0895f3022d9943 (diff)
downloadlinux-4315eab7054d15db50265ab249b7f87912b49902.tar.xz
Merge tag 'phy-fixes-6.2' into next
Merge fixes tag pulled into mainline by Linus into phy/next due to dependency on amlogic patches
Diffstat (limited to 'drivers/phy/phy-can-transceiver.c')
-rw-r--r--drivers/phy/phy-can-transceiver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c
index e556a0faf0fc..5487b9dd1ead 100644
--- a/drivers/phy/phy-can-transceiver.c
+++ b/drivers/phy/phy-can-transceiver.c
@@ -103,6 +103,7 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
struct gpio_desc *standby_gpio;
struct gpio_desc *enable_gpio;
u32 max_bitrate = 0;
+ int err;
can_transceiver_phy = devm_kzalloc(dev, sizeof(struct can_transceiver_phy), GFP_KERNEL);
if (!can_transceiver_phy)
@@ -128,8 +129,8 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
return PTR_ERR(phy);
}
- device_property_read_u32(dev, "max-bitrate", &max_bitrate);
- if (!max_bitrate)
+ err = device_property_read_u32(dev, "max-bitrate", &max_bitrate);
+ if ((err != -EINVAL) && !max_bitrate)
dev_warn(dev, "Invalid value for transceiver max bitrate. Ignoring bitrate limit\n");
phy->attrs.max_link_rate = max_bitrate;