On Tue, 26 Jan 2016, Hannes Reinecke wrote: > dfx_get_bars() allocates the various bars, depending on the > bus type. But as the function itself returns void and there > is no default selection there is a risk of the function > returning without allocating any bars. > This patch moves the entries around so that PCI is assumed > to the the default bus, and adds a WARN_ON check if that > should no be the case. > And I've made some minor code reshuffles to keep checkpatch > happy. > > Signed-off-by: Hannes Reinecke <h...@suse.com> > --- > drivers/net/fddi/defxx.c | 29 ++++++++++++++++------------- > 1 file changed, 16 insertions(+), 13 deletions(-)
NAK, this has been fixed already with a much simpler change, commit 62f2aaabcf41 ("defxx: fix build warning"). Exactly one of `dfx_bus_pci', `dfx_bus_eisa' or `dfx_bus_tc' will always be true or `dfx_register' will not have been called in the first place, so it's not even worth a BUG_ON IMHO. Thanks for looking into this problem though, always welcome! Maciej