Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2039451ybi; Thu, 4 Jul 2019 04:11:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9KdFv9QBq69VbL/PpxtcGC5EESTiGWHDF/w6L/E3TI8XrKI44b/Zs/u1cE/0LFlfuFBd3 X-Received: by 2002:a63:f807:: with SMTP id n7mr44400033pgh.119.1562238707655; Thu, 04 Jul 2019 04:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562238707; cv=none; d=google.com; s=arc-20160816; b=P/DUXgEaF1c+/176iNY9aqjvngiAqJDDR5zSgGvqqtyoxWjBw8QNdfU6km49mWfREC rvSetjCUC4HinSqrqaDqVJNinXlcKDf6ZkcEzApVgX1EFi+Bnc7VCm2DxY2GAU4ri9tP 6iT2ZmxtAQ6i5VcarzbcQM8neN0ndLyyNtCuN2jg5lbJwplXSUlAfzRk9IFIQbQ5Yxrs 2ab+5z8pyaJZOD7zK44BHOtAu9Y73fNGMddFHv6rIShUY3fpWpn5dv0EKD0CXmyHLdVC C06kMpqkUm1M1vXGPgcZbBawgOTqvolQsOO5lVwdlIqeajuq1qyaAQe5/CtQ5XKYj6NU WPIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nfQ+8F4RWLIq/Xb/K7WdaTc8nnzPxXVet5NKBicMp9Y=; b=Xq58j5NmEjGDriX1h356eWrnpL6laBNbUBKaC9/Oc73D899rApHtgXlhy6KVf5FEY7 8LqUKsoGv8CtYBcrmb1mpLoXVgW4zxlEalgAl9SvgH4VYsGvC9VoIt0Zur99Gi+YPldo jfStF5R4si3Rst6Kq4Dbb1nOy7lS2bfycfgcFsw+JC6iESlBWp0WRApvdZUt9w2iRohJ fwl/XjmLcv7ya9oN7IlSnV+QehkY9y51L8ItG6fUPlX9O2ncDSdFgpIKWQtkDke63mq4 oeoNtQ22TSSd+i1YaO5CKMGRN64jPeQaU+RD3MUPpf01I1fkNKQho0cQgnI4+oj9JdB5 ElAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si5289462pgj.519.2019.07.04.04.11.32; Thu, 04 Jul 2019 04:11:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727626AbfGDLLK (ORCPT + 99 others); Thu, 4 Jul 2019 07:11:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45957 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727436AbfGDLLK (ORCPT ); Thu, 4 Jul 2019 07:11:10 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7D7F3082129; Thu, 4 Jul 2019 11:11:09 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-222.ams2.redhat.com [10.36.116.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id A43BC7D57C; Thu, 4 Jul 2019 11:11:09 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DD1A311AB5; Thu, 4 Jul 2019 13:11:07 +0200 (CEST) Date: Thu, 4 Jul 2019 13:11:07 +0200 From: Gerd Hoffmann To: Chia-I Wu Cc: ML dri-devel , Gurchetan Singh , David Airlie , Daniel Vetter , "open list:VIRTIO GPU DRIVER" , open list Subject: Re: [PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers Message-ID: <20190704111107.2cdvzbmil5m4f5ds@sirius.home.kraxel.org> References: <20190702141903.1131-1-kraxel@redhat.com> <20190702141903.1131-8-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 04 Jul 2019 11:11:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > + for (i = 0; i < nents; i++) { > > + objs->nents = i; > This line can be moved into the if-block just below. > > + objs->objs[i] = drm_gem_object_lookup(drm_file, handles[i]); > > + if (!objs->objs[i]) { > > + virtio_gpu_array_put_free(objs); > > + return NULL; > > + } Done. cheers, Gerd