]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/macintosh/therm_adt746x.c
[libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof()
[linux-2.6-omap-h63xx.git] / drivers / macintosh / therm_adt746x.c
index f25685b9b7cf51a782c24faaa86bf9b896e4acca..276945d515130724e2c575b0a538aa8106b2449b 100644 (file)
@@ -379,13 +379,10 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr,
        if (thermostat)
                return 0;
 
-       th = (struct thermostat *)
-               kmalloc(sizeof(struct thermostat), GFP_KERNEL);
-
+       th = kzalloc(sizeof(struct thermostat), GFP_KERNEL);
        if (!th)
                return -ENOMEM;
 
-       memset(th, 0, sizeof(*th));
        th->clt.addr = addr;
        th->clt.adapter = adapter;
        th->clt.driver = &thermostat_driver;