>>> + mutex_unlock(&kvm->lock); >>> + kvm_put_kvm(kvm); >>> + goto fail; >>> + } >>> + return ret; > > of simply > > if (!ret) if (ret >= 0) return ret; is of course what I meant :) > return 0; > > mutex_lock(&kvm->lock); > list_del_rcu(&stt->list); > mutex_unlock(&kvm->lock); > kvm_put_kvm(kvm); -- Thanks, David