ns16550: Re-order the serial port address checking
authorWei Xu <xuwei5@hisilicon.com>
Wed, 26 Feb 2020 09:56:23 +0000 (10:56 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 26 Feb 2020 09:56:23 +0000 (10:56 +0100)
commit102b439f910e761bf92eed9fdf45d49bc6fba5d4
tree9ae6c108b2ae4075985a0d1b8aa8f117ebf8960c
parent5b74f5e42884a01646e9ecf12d402ca20d3ddf7a
ns16550: Re-order the serial port address checking

The serial port address space ID qualifies the address. Whether a value
of zero for the serial port address can sensibly mean "disabled" depends
on the address space ID. Hence check the address space ID before
checking the address.

Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/char/ns16550.c