mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nate Case <ncase@xes-inc.com>
To: Sven Wegener <sven.wegener@stealer.net>
Cc: rpurdie@rpsys.net, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] leds-pca955x: Add proper error handling and fix bogus memory handling
Date: Thu, 07 Aug 2008 17:59:01 -0500	[thread overview]
Message-ID: <1218149941.21619.20.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LNX.1.10.0808080041460.16201@titan.stealer.net>

On Fri, 2008-08-08 at 00:45 +0200, Sven Wegener wrote:
> Check the return value of led_classdev_register and unregister all
> registered
> devices, if registering one device fails. Also the dynamic memory
> handling is
> totally bogus. You can't allocate multiple chunks via kzalloc() and
> expect
> them to be in order later. I wonder how this ever worked.

Yikes.  Good catch.  To be honest, I developed this for an embedded
system where it was always built into the kernel.  So the
pca955x_remove() case never would have been tested.  The assumption
about the chunks being in order probably came from a cut-and-paste from
another driver.

I'll test your patch and also build it as a module to make sure
unloading works properly.  Thanks.

-- 
Nate Case <ncase@xes-inc.com>


  reply	other threads:[~2008-08-07 22:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 21:09 [PATCH v3] leds: Add support for Philips PCA955x I2C LED drivers Nate Case
2008-08-07 22:45 ` [PATCH] leds-pca955x: Add proper error handling and fix bogus memory handling Sven Wegener
2008-08-07 22:59   ` Nate Case [this message]
2008-08-08  6:55   ` [PATCHv2] " Sven Wegener
2008-08-08  7:27     ` [PATCHv3] " Sven Wegener
2008-08-08 16:49       ` Nate Case
2008-08-12 20:18       ` Nate Case
2008-08-15 19:36         ` Sven Wegener

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=1218149941.21619.20.camel@localhost.localdomain \
    --to=ncase@xes-inc.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=sven.wegener@stealer.net \
    /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

all inboxes | Powered by JetHome®