diff --git a/[refs] b/[refs] index 7cd95cf27105..063c9d0f6485 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d5282926aa89587d78bbfeb6655500b1a72de15c +refs/heads/master: c60da82593b30d3b3b97e80f6f74b5f4afa9d0b5 diff --git a/trunk/drivers/hwmon/adcxx.c b/trunk/drivers/hwmon/adcxx.c index a3d3183454ad..111af7c4a3d4 100644 --- a/trunk/drivers/hwmon/adcxx.c +++ b/trunk/drivers/hwmon/adcxx.c @@ -171,7 +171,7 @@ static int __devinit adcxx_probe(struct spi_device *spi) int status; int i; - adc = kzalloc(sizeof *adc, GFP_KERNEL); + adc = devm_kzalloc(&spi->dev, sizeof(*adc), GFP_KERNEL); if (!adc) return -ENOMEM; @@ -208,7 +208,6 @@ static int __devinit adcxx_probe(struct spi_device *spi) spi_set_drvdata(spi, NULL); mutex_unlock(&adc->lock); - kfree(adc); return status; } @@ -224,7 +223,6 @@ static int __devexit adcxx_remove(struct spi_device *spi) spi_set_drvdata(spi, NULL); mutex_unlock(&adc->lock); - kfree(adc); return 0; }