Re: [PATCH 2/2] of: Add check to of_scan_flat_dt() before accessing initial_boot_params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag, 21. November 2016, 20:21:03 CET schrieb Sergei Shtylyov:
> On 11/21/2016 07:23 PM, Tobias Wolf wrote:
>    CC      drivers/of/fdt.o
> drivers/of/fdt.c: In function ‘of_scan_flat_dt’:
> drivers/of/fdt.c:738:3: warning: ‘return’ with no value, in function
> returning non-void [-Wreturn-type]
> drivers/of/fdt.c:740:2: warning: ISO C90 forbids mixed declarations and code
> [-Wdeclaration-after-statement]
> 
> MBR, Sergei

Dear Sergei,

Thanks for that note. In fact it returns whatever it provides. Question is, 
what would be the right value.

int offset, rc = 0, depth = -1;

rc defaults to 0 but something like EINVAL would better reflect that something 
is wrong.

Best regards
Tobias




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux