lkml.org 
[lkml]   [2014]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: stmmac: sti: Fix uninitialized pointer dereference if !OF
From
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Mon, 15 Dec 2014 12:25:51 +0100

> If CONFIG_OF is not set:
>
> drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c: In function ‘sti_dwmac_parse_data’:
> drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c:318: warning: ‘rs’ is used uninitialized in this function
>
> of_property_read_string() will return -ENOSYS in this case, and rs will
> be an uninitialized pointer.
>
> While the fallback clock selection is already selected correctly in this
> case, the string comparisons should be skipped too, else the system will
> crash while dereferencing the uninitialized pointer.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Applied.
\
 
 \ /
  Last update: 2014-12-15 18:21    [W:0.045 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site