File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
99
99
struct gpio_desc * standby_gpio ;
100
100
struct gpio_desc * enable_gpio ;
101
101
u32 max_bitrate = 0 ;
102
+ int err ;
102
103
103
104
can_transceiver_phy = devm_kzalloc (dev , sizeof (struct can_transceiver_phy ), GFP_KERNEL );
104
105
if (!can_transceiver_phy )
@@ -124,8 +125,8 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
124
125
return PTR_ERR (phy );
125
126
}
126
127
127
- device_property_read_u32 (dev , "max-bitrate" , & max_bitrate );
128
- if (!max_bitrate )
128
+ err = device_property_read_u32 (dev , "max-bitrate" , & max_bitrate );
129
+ if (( err != - EINVAL ) && !max_bitrate )
129
130
dev_warn (dev , "Invalid value for transceiver max bitrate. Ignoring bitrate limit\n" );
130
131
phy -> attrs .max_link_rate = max_bitrate ;
131
132
You can’t perform that action at this time.
0 commit comments