vgaarb: use valid dev pointer in vgaarb_info()
authorArnd Bergmann <arnd@arndb.de>
Tue, 22 Nov 2016 14:34:19 +0000 (15:34 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 22 Nov 2016 15:40:35 +0000 (16:40 +0100)
commited2ab35ef1a1f7d42b5dc0d130d359cc0f5e3d9d
tree7f3475e3dd1821f0def5b572acf4aa2b90e04711
parent1ea0c02e7018fdefbfc4333c733ce27c2bb70eff
vgaarb: use valid dev pointer in vgaarb_info()

We now pass the device to the debug messages, but on non-x86,
this is an invalid pointer in vga_arb_device_init:

drivers/gpu/vga/vgaarb.c: In function 'vga_arb_device_init':
drivers/gpu/vga/vgaarb.c:1467:4: error: 'dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This moves the initialization of the dev pointer outside of the
architecture #ifdef.

Fixes: a75d68f62106 ("vgaarb: Use dev_printk() when possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161122143445.1896558-1-arnd@arndb.de
drivers/gpu/vga/vgaarb.c