From 8d5a05da823ebd83a5147e1bfe19036a57a4d33c Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 6 Apr 2009 17:33:48 +0100 Subject: [PATCH] ucc: Fix leaky error path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Found by Daniel Marjamäki using cppcheck Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- drivers/serial/ucc_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 315a9333ca3c..7de66c06b05d 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c @@ -1274,6 +1274,7 @@ static int ucc_uart_probe(struct of_device *ofdev, if (!iprop) { iprop = of_get_property(np, "device-id", NULL); if (!iprop) { + kfree(qe_port); dev_err(&ofdev->dev, "UCC is unspecified in " "device tree\n"); return -EINVAL; -- 2.30.2