Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d8985fd2b8ef8994399ea33f7e5b24395f5a7cab
Commit:     d8985fd2b8ef8994399ea33f7e5b24395f5a7cab
Parent:     e1664ee9f3dabda088debec12ef5322d8bd8ba01
Author:     Anton Vorontsov <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 16:46:17 2008 +0300
Committer:  Kumar Gala <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 23:57:31 2008 -0600

    [POWERPC] qe_lib: fix few fluffy negligences
    
    One is intoduced by me (of_node_put() absence) and another was
    present already (not checking for NULL).
    
    Found by Stephen Rothwell.
    
    Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>
    Acked-by: Stephen Rothwell <[EMAIL PROTECTED]>
    Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---
 arch/powerpc/sysdev/qe_lib/qe.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 5ef844d..6efbd5e 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -66,7 +66,7 @@ phys_addr_t get_qe_base(void)
 {
        struct device_node *qe;
        unsigned int size;
-       const void *prop;
+       const u32 *prop;
 
        if (qebase != -1)
                return qebase;
@@ -79,7 +79,8 @@ phys_addr_t get_qe_base(void)
        }
 
        prop = of_get_property(qe, "reg", &size);
-       qebase = of_translate_address(qe, prop);
+       if (prop && size >= sizeof(*prop))
+               qebase = of_translate_address(qe, prop);
        of_node_put(qe);
 
        return qebase;
@@ -172,10 +173,9 @@ unsigned int get_brg_clk(void)
        }
 
        prop = of_get_property(qe, "brg-frequency", &size);
-       if (!prop || size != sizeof(*prop))
-               return brg_clk;
+       if (prop && size == sizeof(*prop))
+               brg_clk = *prop;
 
-       brg_clk = *prop;
        of_node_put(qe);
 
        return brg_clk;
-
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