diff options
author | Julia Lawall <julia@diku.dk> | 2009-09-19 03:13:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 14:55:14 -0500 |
commit | 4de84057598599bbf90bf1deae923bc33f571475 (patch) | |
tree | e20aeea1f7fced7d01194ebab24dc3949e013a7e /drivers/usb/usb-skeleton.c | |
parent | f0ad073f043b5ac04620bb80ecfc92114d348044 (diff) |
USB: skeleton: Correct use of ! and &
Correct priority problem in the use of ! and &.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@ expression E; constant C; @@
- !E & C
+ !(E & C)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/usb-skeleton.c')
-rw-r--r-- | drivers/usb/usb-skeleton.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index b62f2bc064f6..b1e579c5c97c 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c | |||
@@ -358,7 +358,7 @@ retry: | |||
358 | rv = skel_do_read_io(dev, count); | 358 | rv = skel_do_read_io(dev, count); |
359 | if (rv < 0) | 359 | if (rv < 0) |
360 | goto exit; | 360 | goto exit; |
361 | else if (!file->f_flags & O_NONBLOCK) | 361 | else if (!(file->f_flags & O_NONBLOCK)) |
362 | goto retry; | 362 | goto retry; |
363 | rv = -EAGAIN; | 363 | rv = -EAGAIN; |
364 | } | 364 | } |
@@ -411,7 +411,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, | |||
411 | * limit the number of URBs in flight to stop a user from using up all | 411 | * limit the number of URBs in flight to stop a user from using up all |
412 | * RAM | 412 | * RAM |
413 | */ | 413 | */ |
414 | if (!file->f_flags & O_NONBLOCK) { | 414 | if (!(file->f_flags & O_NONBLOCK)) { |
415 | if (down_interruptible(&dev->limit_sem)) { | 415 | if (down_interruptible(&dev->limit_sem)) { |
416 | retval = -ERESTARTSYS; | 416 | retval = -ERESTARTSYS; |
417 | goto exit; | 417 | goto exit; |