On Monday 14 September 2009, [email protected] wrote:
> + dm365_kp = kzalloc(sizeof *dm365_kp, GFP_KERNEL);
> + key_dev = input_allocate_device();
> +
> + if (!dm365_kp || !key_dev) {
> + dev_dbg(dev, "Could not allocate input device\n");
> + return -ENOMEM;
> + }
Can still leak the kzalloc'ed data...
> + dm365_kp->irq = platform_get_irq(pdev, 0);
> + if (dm365_kp->irq <= 0) {
> + dev_dbg(dev, "%s: No DM365 Keypad irq\n", pdev->name);
> + goto fail1;
> + }
Still discards the true fault codes here and later ...
> + printk(KERN_INFO "DaVinci DM365 Keypad Driver\n");
Nicer not to have such banners; a dev_info() in probe() is
better and won't show on boards where this driver isn't used.
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source