mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
serial: sh-sci: Make probe fail for ports that exceed the maximum count
The driver supports a maximum number of ports configurable at compile time. Make sure the probe() method fails when registering a port that exceeds the maximum instead of returning success without registering the port. This fixes a crash at system suspend time, when the driver tried to suspend a non-registered port using the UART core. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
6dae14216c
commit
b6c5ef6f6d
1 changed files with 1 additions and 1 deletions
|
@ -2391,7 +2391,7 @@ static int __devinit sci_probe_single(struct platform_device *dev,
|
|||
index+1, SCI_NPORTS);
|
||||
dev_notice(&dev->dev, "Consider bumping "
|
||||
"CONFIG_SERIAL_SH_SCI_NR_UARTS!\n");
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = sci_init_single(dev, sciport, index, p);
|
||||
|
|
Loading…
Reference in a new issue