mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
dm: pcidev: clean up assert() for some pci devices
Tracked-On: #3252 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -103,7 +103,10 @@ lpc_uart_intr_assert(void *arg)
|
||||
{
|
||||
struct lpc_uart_vdev *lpc_uart = arg;
|
||||
|
||||
assert(lpc_uart->irq >= 0);
|
||||
if (lpc_uart->irq < 0) {
|
||||
pr_warn("%s: Invalid irq pin lpc_uart\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (lpc_bridge)
|
||||
vm_set_gsi_irq(lpc_bridge->vmctx,
|
||||
@@ -221,7 +224,8 @@ lpc_init(struct vmctx *ctx)
|
||||
iop.arg = lpc_uart;
|
||||
|
||||
error = register_inout(&iop);
|
||||
assert(error == 0);
|
||||
if (error)
|
||||
goto init_failed;
|
||||
lpc_uart->enabled = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user