lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net: ravb_main: fix a missing check of of_get_phy_mode
From
Date
On 12.03.2019 10:38, Sergei Shtylyov wrote:

>> of_get_phy_mode may fail and return a negative error code;
>> the fix checks the return value of of_get_phy_mode and
>> goes to out_release if it fails.
>>
>> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
>> ---
>>   drivers/net/ethernet/renesas/ravb_main.c | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c
>> b/drivers/net/ethernet/renesas/ravb_main.c
>> index d28c8f9ca55b..791b6842eb12 100644
>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>> @@ -1996,6 +1996,7 @@ static int ravb_probe(struct platform_device *pdev)
>>       int error, irq, q;
>>       struct resource *res;
>>       int i;
>> +    int ret;
>
>    There's the 'error' variable already for such things, use it.

Please ignore that. But the variable could be named 'interface' or
somesuch. :-)

[...]

MBR, Sergei

\
 
 \ /
  Last update: 2019-03-12 08:43    [W:1.318 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site