Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=47ebea8351061f763089f6c3e2d2403715b510e1
Commit:     47ebea8351061f763089f6c3e2d2403715b510e1
Parent:     fffda91e2e7ffcc4f60b8666a59f64f28081ce63
Author:     Adrian Bunk <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 22 00:11:16 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Mar 22 19:39:05 2007 -0700

    [PATCH] drivers/video/s3fb.c: fix a use-before-check
    
    NULL checks should be before the first dereference.
    
    Spotted by the Coverity checker.
    
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
    Acked-by: Ondrej Zajicek <[EMAIL PROTECTED]>
    Cc: "Antonino A. Daplas" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/video/s3fb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index 98919a6..3091b20 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -1000,11 +1000,12 @@ err_enable_device:
 static void __devexit s3_pci_remove(struct pci_dev *dev)
 {
        struct fb_info *info = pci_get_drvdata(dev);
-       struct s3fb_info *par = info->par;
 
        if (info) {
 
 #ifdef CONFIG_MTRR
+               struct s3fb_info *par = info->par;
+
                if (par->mtrr_reg >= 0) {
                        mtrr_del(par->mtrr_reg, 0, 0);
                        par->mtrr_reg = -1;
-
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