Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc64: 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 <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200427122415.47416-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wei Yongjun and committed by
Greg Kroah-Hartman
ff62255a e947861d

+1
+1
drivers/tty/vcc.c
··· 605 605 port->index = vcc_table_add(port); 606 606 if (port->index == -1) { 607 607 pr_err("VCC: no more TTY indices left for allocation\n"); 608 + rv = -ENOMEM; 608 609 goto free_ldc; 609 610 } 610 611