We recently pushed the locking down into this function, but there was
an error path where the unlock was missed.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
        case CA_GET_SLOT_INFO: {
                struct ca_slot_info *info = parg;
 
-               if ((info->num > ca->slot_count) || (info->num < 0))
-                       return -EINVAL;
+               if ((info->num > ca->slot_count) || (info->num < 0)) {
+                       err = -EINVAL;
+                       goto out_unlock;
+               }
 
                info->type = CA_CI_LINK;
                info->flags = 0;
                break;
        }
 
+out_unlock:
        mutex_unlock(&ca->ioctl_mutex);
        return err;
 }