diff options
author | Jeff Garzik <jeff@garzik.org> | 2012-07-25 15:58:48 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-07-25 15:58:48 -0400 |
commit | 8407884dd9164ec18ed2afc00f56b87e36c51fcf (patch) | |
tree | b6ea42c231d7d39f454de28a068d78ce11709770 /drivers/hwmon/max1111.c | |
parent | dc7f71f486f4f5fa96f6dcf86833da020cde8a11 (diff) | |
parent | bdc0077af574800d24318b6945cf2344e8dbb050 (diff) | |
download | linux-8407884dd9164ec18ed2afc00f56b87e36c51fcf.tar.bz2 |
Merge branch 'master' [vanilla Linus master] into libata-dev.git/upstream
Two bits were appended to the end of the bitfield
list in struct scsi_device. Resolve that conflict
by including both bits.
Conflicts:
include/scsi/scsi_device.h
Diffstat (limited to 'drivers/hwmon/max1111.c')
-rw-r--r-- | drivers/hwmon/max1111.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c index 362a40eb6129..f3978a46e844 100644 --- a/drivers/hwmon/max1111.c +++ b/drivers/hwmon/max1111.c @@ -168,7 +168,7 @@ static int __devinit max1111_probe(struct spi_device *spi) if (err < 0) return err; - data = kzalloc(sizeof(struct max1111_data), GFP_KERNEL); + data = devm_kzalloc(&spi->dev, sizeof(struct max1111_data), GFP_KERNEL); if (data == NULL) { dev_err(&spi->dev, "failed to allocate memory\n"); return -ENOMEM; @@ -176,7 +176,7 @@ static int __devinit max1111_probe(struct spi_device *spi) err = setup_transfer(data); if (err) - goto err_free_data; + return err; mutex_init(&data->drvdata_lock); @@ -186,7 +186,7 @@ static int __devinit max1111_probe(struct spi_device *spi) err = sysfs_create_group(&spi->dev.kobj, &max1111_attr_group); if (err) { dev_err(&spi->dev, "failed to create attribute group\n"); - goto err_free_data; + return err; } data->hwmon_dev = hwmon_device_register(&spi->dev); @@ -203,8 +203,6 @@ static int __devinit max1111_probe(struct spi_device *spi) err_remove: sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group); -err_free_data: - kfree(data); return err; } @@ -215,7 +213,6 @@ static int __devexit max1111_remove(struct spi_device *spi) hwmon_device_unregister(data->hwmon_dev); sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group); mutex_destroy(&data->drvdata_lock); - kfree(data); return 0; } |