Re: [PATCH v2 1/2] Input: Add DaVinci DM365 Keypad support
From: David Brownell <hidden>
Date: 2009-09-14 18:45:47
On Monday 14 September 2009, miguel.aguilar@ridgerun.com 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. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html