提交 431710ee 编写于 作者: G Greg Kroah-Hartman 提交者: Yang Yingliang

Revert "serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference"

stable inclusion
from linux-4.19.192
commit c5fc7a18c0616f468b30430ce34498d51481bfac

--------------------------------

commit 754f3915 upstream.

This reverts commit 32f47179.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, this commit was found to be not be needed at all as the
change was useless because this function can only be called when
of_match_device matched on something.  So it should be reverted.

Cc: Aditya Pakki <pakki001@umn.edu>
Cc: stable <stable@vger.kernel.org>
Fixes: 32f47179 ("serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference")
Acked-by: NJiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-6-gregkh@linuxfoundation.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 1d2c62ae
...@@ -799,9 +799,6 @@ static int mvebu_uart_probe(struct platform_device *pdev) ...@@ -799,9 +799,6 @@ static int mvebu_uart_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
if (!match)
return -ENODEV;
/* Assume that all UART ports have a DT alias or none has */ /* Assume that all UART ports have a DT alias or none has */
id = of_alias_get_id(pdev->dev.of_node, "serial"); id = of_alias_get_id(pdev->dev.of_node, "serial");
if (!pdev->dev.of_node || id < 0) if (!pdev->dev.of_node || id < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册