public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	GregKH <greg@kroah.com>
Subject: Re: [PATCH 1/2] drivers/w1/masters/mxc_w1.c: use devm_ functions
Date: Thu, 13 Dec 2012 22:28:17 +0400	[thread overview]
Message-ID: <20121213182817.GB30828@ioremap.net> (raw)
In-Reply-To: <1354835724-26945-2-git-send-email-Julia.Lawall@lip6.fr>

On Fri, Dec 07, 2012 at 12:15:24AM +0100, Julia Lawall (Julia.Lawall@lip6.fr) wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> The various devm_ functions allocate memory that is released when a driver
> detaches.  This patch uses these functions for data that is allocated in
> the probe function of a platform device and is only freed in the remove
> function.
> 
> At the same time, this fixes two faults.  First, mdev, the result of
> kzalloc, was never freed.  Second, on failure of ioremap, 0 was returned.
> This has been replaced by -EBUSY, which was the failure value for the call
> to request_mem_region, with which the call to ioremap has been combined.
> 
> The warning message on failure of ioremap is dropped, because
> devm_request_and_ioremap already gives such messages on failure.
> 
> Finally, the initial call to platform_get_resource is moved closer to the
> call to devm_request_and_ioremap, which takes care of checking whether its
> result is NULL, implying that a test on the result of this call to
> platform_get_resource is not needed.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Looks good. Greg, please pull both patches into your tree.
Thank you.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

-- 
	Evgeniy Polyakov

      parent reply	other threads:[~2012-12-13 18:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 23:15 [PATCH 1/2] drivers/w1/masters/mxc_w1.c: use devm_ functions Julia Lawall
2012-12-11 21:25 ` Evgeniy Polyakov
2012-12-13  9:39   ` Dan Carpenter
2012-12-13 10:18     ` Julia Lawall
2012-12-13 11:20       ` Dan Carpenter
2012-12-13 11:23         ` Julia Lawall
2012-12-13 18:27     ` Evgeniy Polyakov
2012-12-13 18:28 ` Evgeniy Polyakov [this message]

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=20121213182817.GB30828@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=Julia.Lawall@lip6.fr \
    --cc=greg@kroah.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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