]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c
MdeModulePkg/PciSioSerial: Fix a bug that wrongly produces 2 UARTs
authorRuiyu Ni <ruiyu.ni@intel.com>
Tue, 8 Nov 2016 02:35:22 +0000 (10:35 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Thu, 10 Nov 2016 02:09:13 +0000 (10:09 +0800)
commit4ab04a72f52e4d12a0c30b20e577e688b786e4fd
tree3019b2dd5d88532cfa966b24408287d0823ab478
parentfaabc5d49700a5042535ff30a07e2c9577ed3cd8
MdeModulePkg/PciSioSerial: Fix a bug that wrongly produces 2 UARTs

When PciSioSerial is firstly started with a non-NULL remaining
device path, the UART instance is created using the parameters
specified in the remaining device path. Later when the driver
is started again on the same UART controller with NULL remaining
device path, the correct logic is to directly return SUCCESS
instead of current buggy implementation which wrongly produces
another UART using the default parameters.

The bug causes two UARTs are created when the UART is configured
in 57600 baud rate.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c