Skip to contentSkip to conversation

gpu: host1x: returning success instead of -ENOMEM

PATCH In review Dan Carpenter 3 participants 3 messages Aug 23, 2013 – Aug 27, 2013 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 gpu: host1x: returning success instead of -ENOMEM

There is a mistake here so it returns PTR_ERR(NULL) which is success instead of -ENOMEM.

---
I can't compile this.

drivers/gpu/host1x/job.c +1 -2
index cc80766..6cf41da 100644
@@ -466,9 +466,8 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
 							 &job->gather_copy,
 							 GFP_KERNEL);
 	if (!job->gather_copy_mapped) {
-		int err = PTR_ERR(job->gather_copy_mapped);
 		job->gather_copy_mapped = NULL;
-		return err;
+		return -ENOMEM;
 	}
 
 	job->gather_copy_size = size;

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 6 lines · Dan Carpenter

There is a mistake here so it returns PTR_ERR(NULL) which is success instead of -ENOMEM.

---
I can't compile this.

For the record, just do:

export CROSS_COMPILE=xxx
make ARCH=arm tegra_defconfig
make ARCH=arm zImage

The only slightly difficult part is getting a CROSS_COMPILE value. Many distros ship at least some ARM cross-compiler in their standard package-set these days, and if not, you can download the Linaro compilers or go to ftp://ftp.kernel.org/pub/tools/crosstool/index.html.