Merge "serial: msm_geni_serial: Return error in probe upon memory allocation failure"
This commit is contained in:
commit
3adb59ea72
1 changed files with 4 additions and 0 deletions
|
|
@ -5475,10 +5475,14 @@ static int msm_geni_serial_port_init(struct platform_device *pdev,
|
|||
if (dev_port->is_console) {
|
||||
dev_port->handle_rx = handle_rx_console;
|
||||
dev_port->rx_fifo = devm_kzalloc(uport->dev, sizeof(u32), GFP_KERNEL);
|
||||
if (!dev_port->rx_fifo)
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
dev_port->handle_rx = handle_rx_hs;
|
||||
dev_port->rx_fifo = devm_kzalloc(uport->dev,
|
||||
sizeof(dev_port->rx_fifo_depth * sizeof(u32)), GFP_KERNEL);
|
||||
if (!dev_port->rx_fifo)
|
||||
return -ENOMEM;
|
||||
if (dev_port->pm_auto_suspend_disable) {
|
||||
pm_runtime_set_active(&pdev->dev);
|
||||
pm_runtime_forbid(&pdev->dev);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue