mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
RDS: Fix ordering in a conditional
Putting the constant first is a supposed "best practice" that actually makes the code harder to read. Thanks to Roland Dreier for finding a bug in this "simple, obviously correct" patch. Signed-off-by: Andy Grover <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
7b70d0336d
commit
7acd4a794c
1 changed files with 1 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ static int rds_pin_pages(unsigned long user_addr, unsigned int nr_pages,
|
|||
nr_pages, write, 0, pages, NULL);
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
|
||||
if (0 <= ret && (unsigned) ret < nr_pages) {
|
||||
if (ret >= 0 && ret < nr_pages) {
|
||||
while (ret--)
|
||||
put_page(pages[ret]);
|
||||
ret = -EFAULT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue