Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995AbbFZGZt (ORCPT ); Fri, 26 Jun 2015 02:25:49 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:51475 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbbFZGZm (ORCPT ); Fri, 26 Jun 2015 02:25:42 -0400 X-AuditID: cbfee68f-f793b6d000005f66-a3-558cf064bbd0 From: Maninder Singh To: airlied@linux.ie, alexander.deucher@amd.com, christian.koenig@amd.com, michel.daenzer@amd.com, monk.liu@amd.com, maarten.lankhorst@canonical.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] gpu/drm: use kzalloc for allocating one thing Date: Fri, 26 Jun 2015 11:54:10 +0530 Message-id: <1435299850-48390-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKLMWRmVeSWpSXmKPExsWyRsSkRjflQ0+owd5X6ha9504yWUy7s5vV 4u19IHHl63s2i8u75rBZPH16gc3i8Pw2FosZs9+wWpy9qGtx781WJgcuj9ZLf9k8ZjX0snls //aA1eN+93Emj74tqxg9Pm+SC2CL4rJJSc3JLEst0rdL4MpY8e0EU8FStopvf3vZGhiXsXYx cnJICJhI3Fy/ihHCFpO4cG89WxcjF4eQwFJGidb+HSwwRb8vLoNKLGKU+NZ3jhXC+cko8bH7 KVg7m4CexKpde1hAEiIC1xklFsx4z9zFyMHBLOAkMf2rHogpDGT+31IDUs4ioCqx/NRjsFZe AXeJy2+nM4KUSAgoSMyZZAMyRUJgOrvEzuf/GCHqBSS+TT7EAlEjK7HpADPEbZISB1fcYJnA KLiAkWEVo2hqQXJBcVJ6kbFecWJucWleul5yfu4mRmBon/73rH8H490D1ocYBTgYlXh4A+70 hAqxJpYVV+YeYjQF2jCRWUo0OR8YQXkl8Yb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f1Tdj43 Zt/brXGet9ki+139tsawq1Mu1S3k6K5WTTA5N4N1aYOiEktxRqKhFnNRcSIAP3ruSbICAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1025 Lines: 30 Use kzalloc rather than kcalloc(1.. for allocating one thing. Signed-off-by: Maninder Singh Reviewed-by: Vaneet Narang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index d3706a4..dd3415d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -674,7 +674,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm) return 0; if (gtt && gtt->userptr) { - ttm->sg = kcalloc(1, sizeof(struct sg_table), GFP_KERNEL); + ttm->sg = kzalloc(sizeof(struct sg_table), GFP_KERNEL); if (!ttm->sg) return -ENOMEM; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/