Re: [PATCH] net: bridge: Fix uninitialized error in br_fdb_sync_static()

2018-02-01 Thread David Miller
From: Geert Uytterhoeven Date: Thu, 1 Feb 2018 11:25:27 +0100 > With gcc-4.1.2.: > > net/bridge/br_fdb.c: In function ‘br_fdb_sync_static’: > net/bridge/br_fdb.c:996: warning: ‘err’ may be used uninitialized in this > function > > Indeed, if the list is empty,

Re: [PATCH] net: bridge: Fix uninitialized error in br_fdb_sync_static()

2018-02-01 Thread Nikolay Aleksandrov
On 01/02/18 12:25, Geert Uytterhoeven wrote: > With gcc-4.1.2.: > > net/bridge/br_fdb.c: In function ‘br_fdb_sync_static’: > net/bridge/br_fdb.c:996: warning: ‘err’ may be used uninitialized in this > function > > Indeed, if the list is empty, err will be uninitialized, and will be >

[PATCH] net: bridge: Fix uninitialized error in br_fdb_sync_static()

2018-02-01 Thread Geert Uytterhoeven
With gcc-4.1.2.: net/bridge/br_fdb.c: In function ‘br_fdb_sync_static’: net/bridge/br_fdb.c:996: warning: ‘err’ may be used uninitialized in this function Indeed, if the list is empty, err will be uninitialized, and will be propagated up as the function return value. Fix this by