]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/i2c/chips/pca9539.c
Merge Paulus' tree
[linux-2.6-omap-h63xx.git] / drivers / i2c / chips / pca9539.c
index 225577fdda4d58113202f395ce08ee1c1c4f200a..59a9303462297737adc275f0eb3bcece12901280 100644 (file)
@@ -122,11 +122,10 @@ static int pca9539_detect(struct i2c_adapter *adapter, int address, int kind)
 
        /* OK. For now, we presume we have a valid client. We now create the
           client structure, even though we cannot fill it completely yet. */
-       if (!(data = kmalloc(sizeof(struct pca9539_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct pca9539_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct pca9539_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);