Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1d3f4b905a786d69103d9e6d8e92683fb2c7a027
Commit:     1d3f4b905a786d69103d9e6d8e92683fb2c7a027
Parent:     43506d954e43933cd6fdcab679f6ab057e7607c6
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 8 16:29:43 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Mon Jul 9 16:17:33 2007 -0700

    IB: Fix ib_umem_get() when npages == 0
    
    gcc correctly warned:
    
    drivers/infiniband/core/umem.c: In function 'ib_umem_get':
    drivers/infiniband/core/umem.c:78: warning: 'ret' may be used uninitialized 
in this function
    
    Set ret to 0 in case npages == 0 and the loop isn't entered at all.
    
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/core/umem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index d40652a..26d0470 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -121,6 +121,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, 
unsigned long addr,
 
        cur_base = addr & PAGE_MASK;
 
+       ret = 0;
        while (npages) {
                ret = get_user_pages(current, current->mm, cur_base,
                                     min_t(int, npages,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to