diff options
author | Xu Jia <xujia39@huawei.com> | 2021-03-24 15:20:31 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-28 14:50:49 +0200 |
commit | 6880149e5a78962a055720981d37e5069f296ef7 (patch) | |
tree | 2cf53daadf728c0cb08bd454f4f8177fd90fae97 /drivers/char/applicom.c | |
parent | 40635128fee8c762b4b3e8ab805a15f01d60b859 (diff) |
applicom: fix some err codes returned by ac_ioctl
When cmd > 6 or copy_to_user() fail, The variable 'ret' would not be
returned back. Fix the 'ret' set but not used.
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xu Jia <xujia39@huawei.com>
Link: https://lore.kernel.org/r/20210324072031.941791-1-xujia39@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/applicom.c')
-rw-r--r-- | drivers/char/applicom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c index 14b2d8034c51..0ab765143354 100644 --- a/drivers/char/applicom.c +++ b/drivers/char/applicom.c @@ -839,7 +839,7 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg) Dummy = readb(apbs[IndexCard].RamIO + VERS); kfree(adgl); mutex_unlock(&ac_mutex); - return 0; + return ret; err: if (warncount) { |