Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b2a657603e7285bf05b86ad198111b5403c57b41
Commit:     b2a657603e7285bf05b86ad198111b5403c57b41
Parent:     3873dd041465799cfdeb642531c0ade4fb6614e5
Author:     Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 16:35:32 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 22:03:40 2007 -0300

    V4L/DVB (5953): msp3400-driver.c: kmalloc + memset conversion to kzalloc
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/msp3400-driver.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/msp3400-driver.c 
b/drivers/media/video/msp3400-driver.c
index 11cfcf1..e9d400e 100644
--- a/drivers/media/video/msp3400-driver.c
+++ b/drivers/media/video/msp3400-driver.c
@@ -813,8 +813,9 @@ static int msp_attach(struct i2c_adapter *adapter, int 
address, int kind)
        int msp_rom;
 
        client = kzalloc(sizeof(*client), GFP_KERNEL);
-       if (client == NULL)
+       if (!client)
                return -ENOMEM;
+
        client->addr = address;
        client->adapter = adapter;
        client->driver = &i2c_driver;
@@ -826,14 +827,14 @@ static int msp_attach(struct i2c_adapter *adapter, int 
address, int kind)
                return 0;
        }
 
-       state = kmalloc(sizeof(*state), GFP_KERNEL);
-       if (state == NULL) {
+       state = kzalloc(sizeof(*state), GFP_KERNEL);
+       if (!state) {
                kfree(client);
                return -ENOMEM;
        }
+
        i2c_set_clientdata(client, state);
 
-       memset(state, 0, sizeof(*state));
        state->v4l2_std = V4L2_STD_NTSC;
        state->audmode = V4L2_TUNER_MODE_STEREO;
        state->volume = 58880;  /* 0db gain */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to