drm: amdgpu: Use the correct size when allocating memory
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_vram_mgr.c
index 97ad8ff..be6a7ec 100644 (file)
@@ -463,7 +463,7 @@ int amdgpu_vram_mgr_alloc_sgt(struct amdgpu_device *adev,
        unsigned int pages;
        int i, r;
 
-       *sgt = kmalloc(sizeof(*sg), GFP_KERNEL);
+       *sgt = kmalloc(sizeof(**sgt), GFP_KERNEL);
        if (!*sgt)
                return -ENOMEM;