login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
20
Re: [PATCH 1/4] regulator/wm831x-dcdc: fix potential NULL dereference
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Mark Brown
Subject:
Re: [PATCH 1/4] regulator/wm831x-dcdc: fix potential NULL dereference
Date: Friday, August 20, 2010 - 2:03 am
On 20 Aug 2010, at 02:58, Axel Lin <axel.lin@gmail.com> wrote:
quoted text
> pdata is dereferenced earlier than tested for being NULL. > Thus move the dereference of "pdata" below the check for NULL. > > Signed-off-by: Axel Lin <axel.lin@gmail.com> > --- > drivers/regulator/wm831x-dcdc.c | 36 ++++++++++++++++++++++++------------ > 1 files changed, 24 insertions(+), 12 deletions(-) > > diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c > index dbfaf59..ed66fac 100644 > --- a/drivers/regulator/wm831x-dcdc.c > +++ b/drivers/regulator/wm831x-dcdc.c > @@ -501,14 +501,17 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev) > { > struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); > struct wm831x_pdata *pdata = wm831x->dev->platform_data; > - int id = pdev->id % ARRAY_SIZE(pdata->dcdc);
ARRAY_SIZE() isn't actually a dereference, it's evaluated at compile time.--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 1/4] regulator/wm831x-dcdc: fix potential NULL dere ...
, Axel Lin
, (Thu Aug 19, 6:58 pm)
[PATCH 2/4] regulator/wm831x-isink: fix potential NULL der ...
, Axel Lin
, (Thu Aug 19, 6:59 pm)
[PATCH 3/4] regulator/wm831x-ldo: fix potential NULL deref ...
, Axel Lin
, (Thu Aug 19, 7:01 pm)
[PATCH 4/4] regulator/wm8994-regulator: fix potential NULL ...
, Axel Lin
, (Thu Aug 19, 7:02 pm)
Re: [PATCH 1/4] regulator/wm831x-dcdc: fix potential NULL ...
, Mark Brown
, (Fri Aug 20, 2:03 am)
Re: [PATCH 1/4] regulator/wm831x-dcdc: fix potential NULL ...
, Axel Lin
, (Fri Aug 20, 8:43 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ingo Molnar
Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3
Vivek Goyal
[PATCH] x86_64: Display more intutive error message if kernel is not 2MB aligned
Andi Kleen
[PATCH] [0/35] Some x86 2.6.22 candidate patches for review
Andrew Morton
Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2
Peter Zijlstra
Re: [RFC PATCH 1/2] Marker probes in futex.c
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
Nicolas Pitre
Re: About git and the use of SHA-1
linux-netdev
:
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
David Dillow
Re: [PATCH 2.6.30-rc4] r8169: avoid losing MSI interrupts
Andi Kleen
Re: RFC: Nagle latency tuning
Paul E. McKenney
Re: [PATCH 1/3] rcu: Introduce hlist_nulls variant of hlist
Russell King
Re: [BUG] New Kernel Bugs
git-commits-head
:
Linux Kernel Mailing List
sh: Fix compile error by operands(mov.l) in sh3/entry.S
Linux Kernel Mailing List
New device ID for sc92031 [1088:2031]
Linux Kernel Mailing List
e1000e: Expose MDI-X status via ethtool change
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
drivers/acpi: use kasprintf
openbsd-misc
:
Andres Salazar
About priorities in /etc/resolv.conf
Rob Shepherd
x86 hardware for router system
Henning Brauer
Re: Sun Blade 1000?
Mitja Muženič
Re: isakmpd -- NCP IPsec client: peer proposed invalid phase 2 IDs
Damien Miller
Re: Patching a SSH 'Weakness'
Colocation donated by:
Syndicate