From: waltfeasel@gmail.com (Walt Feasel)
To: kernelnewbies@lists.kernelnewbies.org
Subject: [PATCH 6/7] security: apparmor: apparmorfs.c Comparison to NULL
Date: Sat, 26 Nov 2016 03:43:24 -0500 [thread overview]
Message-ID: <1480149805-18736-7-git-send-email-waltfeasel@gmail.com> (raw)
In-Reply-To: <1480149805-18736-1-git-send-email-waltfeasel@gmail.com>
Make style modifications for:
CHECK: Comparison to NULL could be written "!data"
Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
---
My first patch of this type checking if
this would be correct
security/apparmor/apparmorfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index c8142cf..c3fff95 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -102,7 +102,7 @@ static char *aa_simple_write_to_buffer(int op, const char __user *userbuf,
/* freed by caller to simple_write_to_buffer */
data = kvmalloc(alloc_size);
- if (data == NULL)
+ if (!data)
return ERR_PTR(-ENOMEM);
if (copy_from_user(data, userbuf, copy_size)) {
--
2.1.4
next prev parent reply other threads:[~2016-11-26 8:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-26 8:43 [PATCH 0/7] security: apparmor: apparmorfs.c Checkpatch mods Walt Feasel
2016-11-26 8:43 ` [PATCH 1/7] security: apparmor: apparmorfs.c Multiple blank lines Walt Feasel
2016-11-26 8:43 ` [PATCH 2/7] security: apparmor: apparmorfs.c Blank line after declarations Walt Feasel
2016-11-26 8:43 ` [PATCH 3/7] security: apparmor: apparmorfs.c Space after cast Walt Feasel
2016-11-26 8:43 ` [PATCH 4/7] security: apparmor: apparmorfs.c WARN_ON vs BUG_ON Walt Feasel
2016-11-26 8:43 ` [PATCH 5/7] security: apparmor: apparmorfs.c Align parenthesis Walt Feasel
2016-11-26 8:43 ` Walt Feasel [this message]
2016-11-26 8:43 ` [PATCH 7/7] security: apparmor: apparmorfs.c Line continuations Walt Feasel
2016-11-26 11:05 ` [PATCH 0/7] security: apparmor: apparmorfs.c Checkpatch mods Greg KH
2016-11-26 16:56 ` Walt Feasel
2016-11-26 17:19 ` Greg KH
2016-11-26 18:02 ` Walt Feasel
2016-11-26 20:40 ` Greg KH
2016-11-26 21:28 ` Bjørn Mork
2016-11-26 22:41 ` Joel Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480149805-18736-7-git-send-email-waltfeasel@gmail.com \
--to=waltfeasel@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.