diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-01-19 21:56:50 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-01-19 21:56:50 +0100 |
commit | 282f445a779ed76fca9884fe377bf56a3088b208 (patch) | |
tree | d9abcf526baee0100672851e0a8894c19e762a39 /drivers/mfd/wm831x-spi.c | |
parent | x86, tsc: Fix SMI induced variation in quick_pit_calibrate() (diff) | |
parent | uml: fix compile for x86-64 (diff) | |
download | linux-282f445a779ed76fca9884fe377bf56a3088b208.tar.xz linux-282f445a779ed76fca9884fe377bf56a3088b208.zip |
Merge remote-tracking branch 'linus/master' into x86/urgent
Diffstat (limited to '')
-rw-r--r-- | drivers/mfd/wm831x-spi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/wm831x-spi.c b/drivers/mfd/wm831x-spi.c index 8d6a9a969dbc..62ef3254105f 100644 --- a/drivers/mfd/wm831x-spi.c +++ b/drivers/mfd/wm831x-spi.c @@ -30,7 +30,7 @@ static int __devinit wm831x_spi_probe(struct spi_device *spi) type = (enum wm831x_parent)id->driver_data; - wm831x = kzalloc(sizeof(struct wm831x), GFP_KERNEL); + wm831x = devm_kzalloc(&spi->dev, sizeof(struct wm831x), GFP_KERNEL); if (wm831x == NULL) return -ENOMEM; @@ -45,7 +45,6 @@ static int __devinit wm831x_spi_probe(struct spi_device *spi) ret = PTR_ERR(wm831x->regmap); dev_err(wm831x->dev, "Failed to allocate register map: %d\n", ret); - kfree(wm831x); return ret; } @@ -95,7 +94,6 @@ MODULE_DEVICE_TABLE(spi, wm831x_spi_id); static struct spi_driver wm831x_spi_driver = { .driver = { .name = "wm831x", - .bus = &spi_bus_type, .owner = THIS_MODULE, .pm = &wm831x_spi_pm, }, |