diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vidmem.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vidmem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vidmem.c b/drivers/gpu/nvgpu/common/linux/vidmem.c index 1d9fea71..684262ba 100644 --- a/drivers/gpu/nvgpu/common/linux/vidmem.c +++ b/drivers/gpu/nvgpu/common/linux/vidmem.c | |||
@@ -173,6 +173,8 @@ int nvgpu_vidmem_export_linux(struct gk20a *g, size_t bytes) | |||
173 | if (!gk20a_get(g)) | 173 | if (!gk20a_get(g)) |
174 | return -ENODEV; | 174 | return -ENODEV; |
175 | 175 | ||
176 | vidmem_dbg(g, "Allocating vidmem buf: %zu bytes", bytes); | ||
177 | |||
176 | priv = nvgpu_kzalloc(g, sizeof(*priv)); | 178 | priv = nvgpu_kzalloc(g, sizeof(*priv)); |
177 | if (!priv) { | 179 | if (!priv) { |
178 | err = -ENOMEM; | 180 | err = -ENOMEM; |
@@ -180,8 +182,8 @@ int nvgpu_vidmem_export_linux(struct gk20a *g, size_t bytes) | |||
180 | } | 182 | } |
181 | 183 | ||
182 | buf = nvgpu_vidmem_user_alloc(g, bytes); | 184 | buf = nvgpu_vidmem_user_alloc(g, bytes); |
183 | if (!buf) { | 185 | if (IS_ERR(buf)) { |
184 | err = -ENOMEM; | 186 | err = PTR_ERR(buf); |
185 | goto fail; | 187 | goto fail; |
186 | } | 188 | } |
187 | 189 | ||