Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1603925imm; Thu, 12 Jul 2018 04:59:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeQX9BUUwl3WJ2dJlyCp/FW0g44Bbp5oPJL2hW0xzdOfZHZTITTWarecTbXBgWjScBEL3EC X-Received: by 2002:a62:3e1a:: with SMTP id l26-v6mr2112857pfa.214.1531396784199; Thu, 12 Jul 2018 04:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531396784; cv=none; d=google.com; s=arc-20160816; b=T9Cx+jE0yRoYz0IO6tKNN1MMj4+LxekP34amurg4aNoWOgHtY00x5wcFPaHpV5QIb3 KS+Haingemrj9nrhV560r8y7yZICD+V1MvbBIf8Ct4Ma8SZIDTAmPOPt3Dw3s7AA6o5j pTwKczIhelRJNHTGV2NTl/+oylBvAv+hITAXPbc9DEY0i6LfLW4ITQceUM/9SWvromum AgsZt3S8z73jCpzS+TQfMv6J8vnB0VlHQ+ZzsdH5XIU2YfPTowewOykzhmp9+niWSPxP 0oUR8Uj644Qn+6UagW8AJ6jECBGo7wkopA2RHqi8+gLi0YfVhYOmxOXshfdojghSCGME /haw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=hH68eWHM1PmXzpkV09JL5fqbHGV1gdGbXz40n6wgnFU=; b=iRTM6L9umXC3eNoxM4ISrdSTAu9yw4uf12+iaHKGyEk2oDJvi3yJxnFy9vt5QxZLY8 pTC+rexAyveX+W0fLA37QiGKvm+nS0Wkw/INoGPNMJB2t0TR4bmYkxYUegaw0KF22Nbk TLVM3XAUnn5AaZqnmseQPT4tc115w/vIAcKTeDajOeX5Yz3inE2dXqNWlJKnv4+ldlMd 2xWxONaU7lq76a4yLOzuczrJpTlsqA18reTUXCzKrA8f7CvstfVs71Q8GHaDNT2JNQm5 6lt/cdxlVyVczcZtsI8fOsT8umytYKDSDpQGGU8jRe1ZSfnQ2bZjazmljUwilWYUJBoT NUIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jFXV52nL; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23-v6si20105527pgl.282.2018.07.12.04.59.29; Thu, 12 Jul 2018 04:59:44 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jFXV52nL; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727597AbeGLMHS (ORCPT + 99 others); Thu, 12 Jul 2018 08:07:18 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:36095 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbeGLMHS (ORCPT ); Thu, 12 Jul 2018 08:07:18 -0400 Received: by mail-lf0-f66.google.com with SMTP id b22-v6so11589411lfa.3 for ; Thu, 12 Jul 2018 04:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=hH68eWHM1PmXzpkV09JL5fqbHGV1gdGbXz40n6wgnFU=; b=jFXV52nLm98WOB9k1fSIet835hE4dHpv0QA6YtD7mLbQatpNHVvNltBIJXbJBqsYtg 0Cwy+J/dSuustAwuIgc7YEK2c0ubuNskeYQ0GuFnCeWEaAqsV+LEPqnbH8q2jFqOAfXu 2I21SS0v05sXN2I0LBRhcwvUmoGNyQ9dOW9oPZFtxcHc4+TMXMKBtOV+hx5pR/P8Frcw 1OUqY0H6+jAnt+xTIg+1PhnoluF1yvMHW+6J0LStDoC3St6pMOS4xW6A3wY/xjHOVXEi 2g1ArjEW3hq7kStBA+1ldsYg7PkBKdShRCXR+jZvfNVUsISjAoL+UbYV+AM1ReAG73UV XOVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=hH68eWHM1PmXzpkV09JL5fqbHGV1gdGbXz40n6wgnFU=; b=q65DowMZ/b3Orscl3roqH3aS3OKa4TwDnLogXFw+ci3ALXIQAHVnUlhu4asUS2WMrn mbEVW87YtDY+30xXMDKXlo0XFsTCAxTtt723/gZz28y++o//rGxl1zzea2eq8tGSzOdh oVGzYG11rn92LhEUwwsZXHOZpsLMSG1qFFGwzrh9iiUudf0H37Yu5l1qwHUXZXnUU3Jz ZiwpGKo6furT6e+mv+SHt+xfWSuo0pwvp00nkO14AXLuPO0q4edfXQTse3QrNLGYiQFf ZlX7vtMF0ZoKzEdlzSMhAAk3aQUQ9/j+ALpDO1lg2pfl3S8SVQGCubKrSopNwBvsh6HD EkxA== X-Gm-Message-State: AOUpUlHKArfwJ+JJIapl2k9zL3WN9hJ64Pl7lcEsbfcTEZRPV4n75Qtp xUvUXGvZaPQq7ol5OQrfM2M= X-Received: by 2002:a19:385a:: with SMTP id d26-v6mr1739718lfj.47.1531396682548; Thu, 12 Jul 2018 04:58:02 -0700 (PDT) Received: from [10.17.182.9] (ll-56.209.223.85.sovam.net.ua. [85.223.209.56]) by smtp.gmail.com with ESMTPSA id u16-v6sm5241202lfi.12.2018.07.12.04.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 04:58:01 -0700 (PDT) Subject: Re: [PATCH v2] drm: Replace NULL with error value in drm_prime_pages_to_sg To: Oleksandr Andrushchenko , Dan Carpenter Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, daniel.vetter@intel.com, seanpaul@chromium.org, gustavo@padovan.org, jgross@suse.com, boris.ostrovsky@oracle.com References: <20180618060709.14290-1-andr2000@gmail.com> <20180618122951.v55dxtjg4azezjvg@mwanda> From: Oleksandr Andrushchenko Message-ID: Date: Thu, 12 Jul 2018 14:58:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/18/2018 03:32 PM, Oleksandr Andrushchenko wrote: > On 06/18/2018 03:29 PM, Dan Carpenter wrote: >> On Mon, Jun 18, 2018 at 09:07:09AM +0300, Oleksandr Andrushchenko wrote: >>> drivers/gpu/drm/drm_gem_cma_helper.c    | 2 +- >>>   drivers/gpu/drm/xen/xen_drm_front_gem.c | 2 +- >>>   2 files changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c >>> b/drivers/gpu/drm/drm_gem_cma_helper.c >>> index 80a5115c3846..ce868ce288fb 100644 >>> --- a/drivers/gpu/drm/drm_gem_cma_helper.c >>> +++ b/drivers/gpu/drm/drm_gem_cma_helper.c >>> @@ -436,7 +436,7 @@ struct sg_table >>> *drm_gem_cma_prime_get_sg_table(struct drm_gem_object *obj) >>>         sgt = kzalloc(sizeof(*sgt), GFP_KERNEL); >>>       if (!sgt) >>> -        return NULL; >>> +        return ERR_PTR(-ENOMEM); >>>         ret = dma_get_sgtable(obj->dev->dev, sgt, cma_obj->vaddr, >>>                     cma_obj->paddr, obj->size); >> >> If dma_get_sgtable() fails then we return NULL. >> >> Fix that and it should be good. > You mean I can put your r-b with that fixed? ping >> regards, >> dan carpenter >> >