X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fhwmon%2Fgl520sm.c;h=c39ba12394260faebe9c1088e86e5e42a1b7b3ca;hb=8a87a0b6313109d2fea87b1271d497c954ce2ca8;hp=12fd757066fc9cad503b32a5c1df1e056909fbb5;hpb=64e47488c913ac704d465a6af86a26786d1412a5;p=linux-2.6-omap-h63xx.git diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c index 12fd757066f..c39ba123942 100644 --- a/drivers/hwmon/gl520sm.c +++ b/drivers/hwmon/gl520sm.c @@ -536,11 +536,10 @@ static int gl520_detect(struct i2c_adapter *adapter, int address, int kind) client structure, even though we cannot fill it completely yet. But it allows us to access gl520_{read,write}_value. */ - if (!(data = kmalloc(sizeof(struct gl520_data), GFP_KERNEL))) { + if (!(data = kzalloc(sizeof(struct gl520_data), GFP_KERNEL))) { err = -ENOMEM; goto exit; } - memset(data, 0, sizeof(struct gl520_data)); new_client = &data->client; i2c_set_clientdata(new_client, data);