diff options
author | Deepak Saxena <dsaxena@plexity.net> | 2005-10-17 17:09:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:12 -0400 |
commit | 5263ebb51eb098b01caf229498c954999117e4a7 (patch) | |
tree | f18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/chips/pca9539.c | |
parent | ba9c2e8d15da029ea3051c95e446b2d638ef02e2 (diff) |
[PATCH] i2c: kzalloc conversion, other drivers
Use kzalloc instead of kmalloc+memset in all remaining i2c bus and
chip drivers.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/chips/pca9539.c')
-rw-r--r-- | drivers/i2c/chips/pca9539.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/chips/pca9539.c b/drivers/i2c/chips/pca9539.c index 225577fdda4d..59a930346229 100644 --- a/drivers/i2c/chips/pca9539.c +++ b/drivers/i2c/chips/pca9539.c | |||
@@ -122,11 +122,10 @@ static int pca9539_detect(struct i2c_adapter *adapter, int address, int kind) | |||
122 | 122 | ||
123 | /* OK. For now, we presume we have a valid client. We now create the | 123 | /* OK. For now, we presume we have a valid client. We now create the |
124 | client structure, even though we cannot fill it completely yet. */ | 124 | client structure, even though we cannot fill it completely yet. */ |
125 | if (!(data = kmalloc(sizeof(struct pca9539_data), GFP_KERNEL))) { | 125 | if (!(data = kzalloc(sizeof(struct pca9539_data), GFP_KERNEL))) { |
126 | err = -ENOMEM; | 126 | err = -ENOMEM; |
127 | goto exit; | 127 | goto exit; |
128 | } | 128 | } |
129 | memset(data, 0, sizeof(struct pca9539_data)); | ||
130 | 129 | ||
131 | new_client = &data->client; | 130 | new_client = &data->client; |
132 | i2c_set_clientdata(new_client, data); | 131 | i2c_set_clientdata(new_client, data); |