A few simple fixes.
 
 1)Fix up some possible divide by zero issues in various drivers.
 
 2)Prevent a memory leak in an error path in lis3l02dq
 
 3)Make sure the PTR_ERR call in at91_adc matches the
 check for IS_ERR just above it rather than using a different
 pointer.
 
 Merges fine against v3.6rc4
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQRQcKAAoJEFSFNJnE9BaIjVMP/1jVSTedrg0pVWQnVfyT3jSE
 ZjXGFWcmF5HGfAdpqFEu6uswTQQnzLixy5s5Wi1m2ozxXtXcbbpSW20RdBHpl94x
 BfkqrkMwa3v8fOxecwYrkyXT433g1B1+4FUm7ffk2ddsTBig01s/1MUNR4X7rBMo
 vxT5cGsLMAhn4oglar50TukDgQnCf+y1TiXfIShjQHlVlx4hJY5mYll4sxt+BFc8
 0gGekdvtFlCyBr0quWUUkuiPC55wVBayOYjvW4hn5I3Vb38JA9mmHWHwwVq2WXtl
 jueYq7mcIMDButn90tNZhITHjQd7O2PrtYZpomsDQhTaJ1wkSRZf8SKSFDRXf5qW
 57vNY0/k4zoJdVPVDizv3A53NFE596ExsZUHQlWgVNmfUmTyHEu8E3gU5TxrSWem
 PfHCu7ZB/1dwo9+d6BY9V+eqiWe9WovUoj6W9dG1mAdfJ4XrlzicsiU+HV16stxD
 D+ESLslZiXxpW29TJFqhXARawNwitdkGvGF0+j++RnIoBSqxwi4jP4IgTkCKuR8H
 zCnkJCpzOwrDtZi3zVD4KcHFk9fnKWZM3jFKQtkTMc3Q9hHZgOwZDZ6qY6r0lsHp
 9wMOHCc1zPzjcTLjnvJKdFKd7ge0WPKLk8+AXWsfeNZlj6VJsuO20+o9agYTDU04
 cp1AfSTqxP7+sKr+NVLb
 =pdyb
 -----END PGP SIGNATURE-----

Merge tag 'v3.6-rc1-iio-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

IIO fixes for v3.6-rc1 set 2

A few simple fixes.

1)Fix up some possible divide by zero issues in various drivers.

2)Prevent a memory leak in an error path in lis3l02dq

3)Make sure the PTR_ERR call in at91_adc matches the
check for IS_ERR just above it rather than using a different
pointer.

Merges fine against v3.6rc4
This commit is contained in:
Greg Kroah-Hartman 2012-09-04 12:09:17 -07:00
Родитель 61ed59ed09 f755bbbf1f
Коммит d947d63592
8 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -617,7 +617,7 @@ static int __devinit at91_adc_probe(struct platform_device *pdev)
st->adc_clk = clk_get(&pdev->dev, "adc_op_clk");
if (IS_ERR(st->adc_clk)) {
dev_err(&pdev->dev, "Failed to get the ADC clock.\n");
ret = PTR_ERR(st->clk);
ret = PTR_ERR(st->adc_clk);
goto error_disable_clk;
}

Просмотреть файл

@ -121,8 +121,10 @@ static int lis3l02dq_get_buffer_element(struct iio_dev *indio_dev,
if (rx_array == NULL)
return -ENOMEM;
ret = lis3l02dq_read_all(indio_dev, rx_array);
if (ret < 0)
if (ret < 0) {
kfree(rx_array);
return ret;
}
for (i = 0; i < scan_count; i++)
data[i] = combine_8_to_16(rx_array[i*4+1],
rx_array[i*4+3]);

Просмотреть файл

@ -647,6 +647,8 @@ static ssize_t ad7192_write_frequency(struct device *dev,
ret = strict_strtoul(buf, 10, &lval);
if (ret)
return ret;
if (lval == 0)
return -EINVAL;
mutex_lock(&indio_dev->mlock);
if (iio_buffer_enabled(indio_dev)) {

Просмотреть файл

@ -195,6 +195,8 @@ static ssize_t adis16260_write_frequency(struct device *dev,
ret = strict_strtol(buf, 10, &val);
if (ret)
return ret;
if (val == 0)
return -EINVAL;
mutex_lock(&indio_dev->mlock);
if (spi_get_device_id(st->us)) {

Просмотреть файл

@ -234,6 +234,8 @@ static ssize_t adis16400_write_frequency(struct device *dev,
ret = strict_strtol(buf, 10, &val);
if (ret)
return ret;
if (val == 0)
return -EINVAL;
mutex_lock(&indio_dev->mlock);

Просмотреть файл

@ -425,6 +425,8 @@ static ssize_t ade7753_write_frequency(struct device *dev,
ret = strict_strtol(buf, 10, &val);
if (ret)
return ret;
if (val == 0)
return -EINVAL;
mutex_lock(&indio_dev->mlock);

Просмотреть файл

@ -445,6 +445,8 @@ static ssize_t ade7754_write_frequency(struct device *dev,
ret = strict_strtol(buf, 10, &val);
if (ret)
return ret;
if (val == 0)
return -EINVAL;
mutex_lock(&indio_dev->mlock);

Просмотреть файл

@ -385,6 +385,8 @@ static ssize_t ade7759_write_frequency(struct device *dev,
ret = strict_strtol(buf, 10, &val);
if (ret)
return ret;
if (val == 0)
return -EINVAL;
mutex_lock(&indio_dev->mlock);