net: defxx: Fix warning of uninitialized variable
Subsystems (2)
PATCH 1/1 net: defxx: Fix warning of uninitialized variable
This adds explicit initialization of bar_start and bar_len resource arrays in accordance with the compiler warning.
Signed-off-by Deepa Dinamani <[email protected]>
--- drivers/net/fddi/defxx.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/fddi/defxx.c +3 -0
@@ -439,6 +439,9 @@ static void dfx_get_bars(struct device *bdev,int dfx_bus_tc =DFX_BUS_TC (bdev);int dfx_use_mmio =DFX_MMIO || dfx_bus_tc; +memset (bar_start,0 ,sizeof (resource_size_t) *3 ); +memset (bar_len,0 ,sizeof (resource_size_t) *3 ); +if (dfx_bus_pci) {int num = dfx_use_mmio ?0 :1 ;
Signature · 1 line
1.9.1
Quoted 6 lines · Deepa Dinamani
This adds explicit initialization of
bar_startandbar_lenresource arrays in accordance with the compiler warning.Signed-off-by Deepa Dinamani <[email protected]>--- drivers/net/fddi/defxx.c | 3 +++
Note, we can't do anything with patches outside of drivers/staging/ in the kernel tree for the Outreachy application process, sorry. I'd recommend staying away from other parts of the kernel right now, unless the mentor you have contacted tells you otherwise.
thanks,
greg k-h