From: Mathieu Maret <mathieu.maret@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: arve@android.com, gregkh@linuxfoundation.org, joe@perches.com,
Mathieu Maret <mathieu.maret@gmail.com>
Subject: [PATCH 2/2] staging: binder: Code simplification
Date: Tue, 25 Mar 2014 23:03:21 +0100 [thread overview]
Message-ID: <1395785001-4153-2-git-send-email-mathieu.maret@gmail.com> (raw)
In-Reply-To: <1395785001-4153-1-git-send-email-mathieu.maret@gmail.com>
Remove duplicate code
Signed-off-by: Mathieu Maret <mathieu.maret@gmail.com>
---
drivers/staging/android/binder.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 6d8ee37..67aaa38 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -2685,11 +2685,9 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
break;
case BINDER_VERSION: {
struct binder_version __user *ver = ubuf;
- if (size != sizeof(struct binder_version)) {
- ret = -EINVAL;
- goto err;
- }
- if (put_user(BINDER_CURRENT_PROTOCOL_VERSION,
+
+ if (size != sizeof(struct binder_version) ||
+ put_user(BINDER_CURRENT_PROTOCOL_VERSION,
&ver->protocol_version)) {
ret = -EINVAL;
goto err;
--
1.9.1
next prev parent reply other threads:[~2014-03-25 22:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 22:03 [PATCHv2 1/2] staging: binder: add __user annotation in binder.c Mathieu Maret
2014-03-25 22:03 ` Mathieu Maret [this message]
2014-03-25 22:21 ` [PATCH 2/2] staging: binder: Code simplification Joe Perches
2014-03-25 22:47 ` Mathieu Maret
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=1395785001-4153-2-git-send-email-mathieu.maret@gmail.com \
--to=mathieu.maret@gmail.com \
--cc=arve@android.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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.