Skip to content

Commit

Permalink
Revert "serial: mvebu-uart: Fix to avoid a potential NULL pointer der…
Browse files Browse the repository at this point in the history
…eference"

This reverts commit 32f4717.

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 <[email protected]>
Cc: stable <[email protected]>
Fixes: 32f4717 ("serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference")
Acked-by: Jiri Slaby <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed May 13, 2021
1 parent 99ae341 commit 754f391
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/tty/serial/mvebu-uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,9 +818,6 @@ static int mvebu_uart_probe(struct platform_device *pdev)
return -EINVAL;
}

if (!match)
return -ENODEV;

/* Assume that all UART ports have a DT alias or none has */
id = of_alias_get_id(pdev->dev.of_node, "serial");
if (!pdev->dev.of_node || id < 0)
Expand Down

0 comments on commit 754f391

Please sign in to comment.