On Fri, Apr 26, 2024 at 2:26 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > I don't really have enough knowledge to comment on the functionality, > but this code structure is really odd to read. > > Try to handle error conditions with early returns first, please: > > if (unlikely(nr_pages_needed != 1)) > return -EINVAL; > return __kvm_gfn_to_hva_cache_init(slots, ghc, gpa, len); Thanks for the tip! This makes sense to me and I will take care of this code structure.