]> err.no Git - linux-2.6/blobdiff - drivers/video/w100fb.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
[linux-2.6] / drivers / video / w100fb.c
index 5fc86ea20692ff0e12309c9bd459b80282a89a0c..30469bf906e54b51a6688918624fd030ab6f25cf 100644 (file)
@@ -660,7 +660,7 @@ int __init w100fb_probe(struct platform_device *pdev)
                        err = -ENODEV;
                        goto out;
        }
-       printk(" at 0x%08lx.\n", mem->start+W100_CFG_BASE);
+       printk(" at 0x%08lx.\n", (unsigned long) mem->start+W100_CFG_BASE);
 
        /* Remap the framebuffer */
        remapped_fbuf = ioremap_nocache(mem->start+MEM_WINDOW_BASE, MEM_WINDOW_SIZE);
@@ -753,16 +753,22 @@ int __init w100fb_probe(struct platform_device *pdev)
                goto out;
        }
 
-       device_create_file(&pdev->dev, &dev_attr_fastpllclk);
-       device_create_file(&pdev->dev, &dev_attr_reg_read);
-       device_create_file(&pdev->dev, &dev_attr_reg_write);
-       device_create_file(&pdev->dev, &dev_attr_flip);
+       err = device_create_file(&pdev->dev, &dev_attr_fastpllclk);
+       err |= device_create_file(&pdev->dev, &dev_attr_reg_read);
+       err |= device_create_file(&pdev->dev, &dev_attr_reg_write);
+       err |= device_create_file(&pdev->dev, &dev_attr_flip);
+
+       if (err != 0)
+               printk(KERN_WARNING "fb%d: failed to register attributes (%d)\n",
+                               info->node, err);
 
        printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id);
        return 0;
 out:
-       fb_dealloc_cmap(&info->cmap);
-       kfree(info->pseudo_palette);
+       if (info) {
+               fb_dealloc_cmap(&info->cmap);
+               kfree(info->pseudo_palette);
+       }
        if (remapped_fbuf != NULL)
                iounmap(remapped_fbuf);
        if (remapped_regs != NULL)