linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: davinci-linux-open-source@linux.davincidsp.com
Cc: miguel.aguilar@ridgerun.com, nsnehaprabha@ti.com,
	linux-input@vger.kernel.org, santiago.nunez@ridgerun.com,
	todd.fischer@ridgerun.com, clark.becker@ridgerun.com
Subject: Re: [PATCH v2 1/2] Input: Add DaVinci DM365 Keypad support
Date: Mon, 14 Sep 2009 11:45:47 -0700	[thread overview]
Message-ID: <200909141145.48252.david-b@pacbell.net> (raw)
In-Reply-To: <1252951959-31015-1-git-send-email-miguel.aguilar@ridgerun.com>

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

  reply	other threads:[~2009-09-14 18:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 18:12 [PATCH v2 1/2] Input: Add DaVinci DM365 Keypad support miguel.aguilar
2009-09-14 18:45 ` David Brownell [this message]
2009-09-17 17:49   ` Miguel Aguilar
2009-09-17 18:01     ` Sergei Shtylyov
2009-09-17 19:27       ` Miguel Aguilar
2009-09-17 19:48         ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909141145.48252.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=clark.becker@ridgerun.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=miguel.aguilar@ridgerun.com \
    --cc=nsnehaprabha@ti.com \
    --cc=santiago.nunez@ridgerun.com \
    --cc=todd.fischer@ridgerun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).