summaryrefslogtreecommitdiff
path: root/drivers/phy/phy-can-transceiver.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2023-01-23 15:56:00 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-01-23 15:56:00 +0300
commit91f67b9a6472a243e2c0630f637ddff0af08038e (patch)
tree2ba948b5b9a9c13b3494efb3a4006c15db1cbb37 /drivers/phy/phy-can-transceiver.c
parent5670ebf54bd26482f57a094c53bdc562c106e0a9 (diff)
parent2475bf0250dee99b477e0c56d7dc9d7ac3f04117 (diff)
downloadlinux-91f67b9a6472a243e2c0630f637ddff0af08038e.tar.xz
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick fixes that went via perf/urgent. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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 95c6dbb52da7..ce511ad5d369 100644
--- a/drivers/phy/phy-can-transceiver.c
+++ b/drivers/phy/phy-can-transceiver.c
@@ -99,6 +99,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)
@@ -124,8 +125,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;