All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
To: David Brownell <david-b@pacbell.net>
Cc: davinci-linux-open-source@linux.davincidsp.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: Thu, 17 Sep 2009 11:49:51 -0600	[thread overview]
Message-ID: <4AB276BF.9000807@ridgerun.com> (raw)
In-Reply-To: <200909141145.48252.david-b@pacbell.net>

David,

What are the proper error codes when platform_get_resource, request_mem_region 
and ioremap functions fail?.

Thanks,

Miguel Aguilar
David Brownell wrote:
> 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-17 17:49 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
2009-09-17 17:49   ` Miguel Aguilar [this message]
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=4AB276BF.9000807@ridgerun.com \
    --to=miguel.aguilar@ridgerun.com \
    --cc=clark.becker@ridgerun.com \
    --cc=david-b@pacbell.net \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=linux-input@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.