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>
This commit is contained in:
Xu Jia 2021-03-24 15:20:31 +08:00 committed by Greg Kroah-Hartman
parent 40635128fe
commit 6880149e5a
1 changed files with 1 additions and 1 deletions

View File

@ -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) {