Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1212742
| From | Peng Sun <sironhide0null@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/6] fix android/sw_sync.c several coding style issues |
| Date | 2015-08-25 09:00 +0200 |
| Message-ID | <q1gn8-7jI-11@gated-at.bofh.it> (permalink) |
| References | <q1gn8-7jI-3@gated-at.bofh.it> <q1gn8-7jI-7@gated-at.bofh.it> <q1gn8-7jI-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Corrections based on checkpatch.pl with --strict
1) Comparison to NULL could be written "!obj"
2) Comparison to NULL could be written "!pt"
3) Comparison to NULL could be written "!fence"
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
---
drivers/staging/android/sw_sync.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index c90838d..29b5c35 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -145,7 +145,7 @@ static int sw_sync_open(struct inode *inode, struct file *file)
get_task_comm(task_comm, current);
obj = sw_sync_timeline_create(task_comm);
- if (obj == NULL)
+ if (!obj)
return -ENOMEM;
file->private_data = obj;
@@ -179,14 +179,14 @@ static long sw_sync_ioctl_create_fence(struct sw_sync_timeline *obj,
}
pt = sw_sync_pt_create(obj, data.value);
- if (pt == NULL) {
+ if (!pt) {
err = -ENOMEM;
goto err;
}
data.name[sizeof(data.name) - 1] = '\0';
fence = sync_fence_create(data.name, pt);
- if (fence == NULL) {
+ if (!fence) {
sync_pt_free(pt);
err = -ENOMEM;
goto err;
--
1.9.1
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] fix drivers/staging/android several coding issues Peng Sun <sironhide0null@gmail.com> - 2015-08-25 09:00 +0200
[PATCH 4/6] fix android/sync.c several coding style issues Peng Sun <sironhide0null@gmail.com> - 2015-08-25 09:00 +0200
[PATCH 1/6] fix android/ashmem.c several coding style issues Peng Sun <sironhide0null@gmail.com> - 2015-08-25 09:00 +0200
[PATCH 3/6] fix android/sw_sync.c several coding style issues Peng Sun <sironhide0null@gmail.com> - 2015-08-25 09:00 +0200
[PATCH 2/6] fix android/lowmemorykiller.c several coding style issues Peng Sun <sironhide0null@gmail.com> - 2015-08-25 09:00 +0200
Re: [PATCH 0/6] fix drivers/staging/android several coding issues Joe Perches <joe@perches.com> - 2015-08-25 17:20 +0200
csiph-web