sparc64: vcc: Fix error return code in vcc_probe()
Subsystems (3)
PATCH 1/1 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.
--- drivers/tty/vcc.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/vcc.c +1 -0
@@ -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; }
Greg Kroah-Hartman
maintainerQuoted 7 lines · Wei Yongjun
Fix to return negative error code
-ENOMEMfrom the error handling case instead of 0, as done elsewhere in this function.Signed-off-by Wei Yongjun <[email protected]>--- drivers/tty/vcc.c | 1 + 1 file changed, 1 insertion(+)
Why is sparc64 in your subject line?
confused,
greg k-h
DQo+IE9uIE1vbiwgQXByIDI3LCAyMDIwIGF0IDEyOjI0OjE1UE0gKzAwMDAsIFdlaSBZb25nanVu IHdyb3RlOg0KPiA+IEZpeCB0byByZXR1cm4gbmVnYXRpdmUgZXJyb3IgY29kZSAtRU5PTUVNIGZy b20gdGhlIGVycm9yIGhhbmRsaW5nIGNhc2UNCj4gPiBpbnN0ZWFkIG9mIDAsIGFzIGRvbmUgZWxz ZXdoZXJlIGluIHRoaXMgZnVuY3Rpb24uDQo+ID4NCj4gPiBTaWduZWQtb2ZmLWJ5OiBXZWkgWW9u Z2p1biA8d2VpeW9uZ2p1bjFAaHVhd2VpLmNvbT4NCj4gPiAtLS0NCj4gPiAgZHJpdmVycy90dHkv dmNjLmMgfCAxICsNCj4gPiAgMSBmaWxlIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspDQo+IA0KPiBX aHkgaXMgc3BhcmM2NCBpbiB5b3VyIHN1YmplY3QgbGluZT8NCj4gDQo+IGNvbmZ1c2VkLA0KPiAN Cg0KSSBnb3QgJ3NwYXJjNjSjunZjYzonIGZyb20gZ2l0IGxvZyAsd2lsbCBjaGFuZ2UgdG8gJ3R0 eTogdmNjJywgdGhhbmtzLg0KDQpSZWdhcmRzDQo
David Miller
maintainerFrom: Greg Kroah-Hartman <[email protected]>
Date: Mon, 27 Apr 2020 14:27:47 +0200
Quoted 10 lines · Wei Yongjun
Quoted 7 lines
Fix to return negative error code
-ENOMEMfrom the error handling case instead of 0, as done elsewhere in this function.Signed-off-by Wei Yongjun <[email protected]>--- drivers/tty/vcc.c | 1 + 1 file changed, 1 insertion(+)Why is sparc64 in your subject line?
It's a sparc64 hypervisor console driver.
Greg KH
maintainerQuoted 7 lines · David Miller
From: Greg Kroah-Hartman <[email protected]>
Date: Mon, 27 Apr 2020 14:27:47 +0200Quoted 4 lines · Wei Yongjun
Quoted 3 lines
Fix to return negative error code
-ENOMEMfrom the error handling case instead of 0, as done elsewhere in this function.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Wei Yongjun <[email protected]>--- drivers/tty/vcc.c | 1 + 1 file changed, 1 insertion(+)Why is sparc64 in your subject line?
It's a sparc64 hypervisor console driver.
Ah, that wasn't very obvious, sorry about that.
greg k-h