aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/pca9539.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/pca9539.c')
-rw-r--r--drivers/i2c/chips/pca9539.c3
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);