USB: serial: mos7840: fix error code in mos7840_write()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 26 Jan 2021 10:26:54 +0000 (13:26 +0300)
committerJohan Hovold <johan@kernel.org>
Tue, 26 Jan 2021 14:29:57 +0000 (15:29 +0100)
commita70aa7dc60099bbdcbd6faca42a915d80f31161e
treec6adf0810a09023fd72b673f2cbcc09cebbb0ae8
parent5f6225a7fb2c863ca40ca282478933c0afdb3512
USB: serial: mos7840: fix error code in mos7840_write()

This should return -ENOMEM instead of 0 if the kmalloc() fails.

Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7840.c