diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2020-02-12 10:38:39 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-02-14 08:43:56 +0100 |
commit | ee6a508d2b1738c30d4e2eab06ce5732d172524d (patch) | |
tree | c388bce162ac1be2b9bccb9d0fcad40636020b47 | |
parent | a6bd302075aaecdc3d0e1836a725c0d09c9ad2ec (diff) | |
download | barebox-ee6a508d2b1738c30d4e2eab06ce5732d172524d.tar.gz barebox-ee6a508d2b1738c30d4e2eab06ce5732d172524d.tar.xz |
serial: ns16550_pci: fix possible read of uninitialized variable
When quirk->init is NULL, we evaluate an uninitialized rc.
Is we have already checked for rc < 0 at the point of assignment,
this if clause isn't needed. Remove it.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/serial/serial_ns16550_pci.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/serial/serial_ns16550_pci.c b/drivers/serial/serial_ns16550_pci.c index d4b5bd8898..392a2810d8 100644 --- a/drivers/serial/serial_ns16550_pci.c +++ b/drivers/serial/serial_ns16550_pci.c @@ -3655,12 +3655,6 @@ pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board) uart.pdata = xzalloc(sizeof(*uart.pdata)); uart.pdata->clock = board->base_baud * 16; - if (rc < 0) { - kfree(priv); - priv = ERR_PTR(rc); - goto err_deinit; - } - for (i = 0; i < nr_ports; i++) { struct device_d *ns16550_dev; struct resource *res; |