diff options
author | Wei Yongjun <[email protected]> | 2020-04-27 13:22:20 +0000 |
---|---|---|
committer | David S. Miller <[email protected]> | 2020-05-13 15:33:43 -0700 |
commit | 9ef391bdc29f0570c2be578210e220d15ea7a453 (patch) | |
tree | 38587d12142b8c3b50e475bb019a38db63d4111b | |
parent | 60da7d0bc7482a30817c73fdc8152123d19919f8 (diff) |
tty: vcc: Fix error return code in vcc_probe()
Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | drivers/tty/vcc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index d2a1e1228c82..9ffd42e333b8 100644 --- a/drivers/tty/vcc.c +++ b/drivers/tty/vcc.c @@ -605,6 +605,7 @@ static int vcc_probe(struct vio_dev *vdev, const struct vio_device_id *id) port->index = vcc_table_add(port); if (port->index == -1) { pr_err("VCC: no more TTY indices left for allocation\n"); + rv = -ENOMEM; goto free_ldc; } |