* [PATCH] mfd: Avoid writing uninitialized value to device
@ 2011-12-08 8:45 Axel Lin
2011-12-09 2:26 ` Haojian Zhuang
2011-12-19 11:58 ` Samuel Ortiz
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2011-12-08 8:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Haojian Zhuang, Samuel Ortiz
Avoid writing uninitialized value to device by explicitly initialize
zero to 0.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mfd/88pm860x-i2c.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/88pm860x-i2c.c b/drivers/mfd/88pm860x-i2c.c
index e017dc8..fcde8a3 100644
--- a/drivers/mfd/88pm860x-i2c.c
+++ b/drivers/mfd/88pm860x-i2c.c
@@ -151,7 +151,7 @@ int pm860x_page_reg_write(struct i2c_client *i2c, int reg,
unsigned char data)
{
struct pm860x_chip *chip = i2c_get_clientdata(i2c);
- unsigned char zero;
+ unsigned char zero = 0;
int ret;
mutex_lock(&chip->io_lock);
@@ -208,7 +208,7 @@ int pm860x_page_set_bits(struct i2c_client *i2c, int reg,
unsigned char mask, unsigned char data)
{
struct pm860x_chip *chip = i2c_get_clientdata(i2c);
- unsigned char zero;
+ unsigned char zero = 0;
unsigned char value;
int ret;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: Avoid writing uninitialized value to device
2011-12-08 8:45 [PATCH] mfd: Avoid writing uninitialized value to device Axel Lin
@ 2011-12-09 2:26 ` Haojian Zhuang
2011-12-19 11:58 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Haojian Zhuang @ 2011-12-09 2:26 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Haojian Zhuang, Samuel Ortiz
On Thu, Dec 8, 2011 at 4:45 PM, Axel Lin <axel.lin@gmail.com> wrote:
> Avoid writing uninitialized value to device by explicitly initialize
> zero to 0.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: Avoid writing uninitialized value to device
2011-12-08 8:45 [PATCH] mfd: Avoid writing uninitialized value to device Axel Lin
2011-12-09 2:26 ` Haojian Zhuang
@ 2011-12-19 11:58 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2011-12-19 11:58 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Haojian Zhuang
Hi Axel,
On Thu, Dec 08, 2011 at 04:45:20PM +0800, Axel Lin wrote:
> Avoid writing uninitialized value to device by explicitly initialize
> zero to 0.
88pm860x is now using the regmap API, so this patch is no longer relevant.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-19 11:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-08 8:45 [PATCH] mfd: Avoid writing uninitialized value to device Axel Lin
2011-12-09 2:26 ` Haojian Zhuang
2011-12-19 11:58 ` Samuel Ortiz
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.