Commit d9e757b4 authored by Dirk Behme's avatar Dirk Behme Committed by Tony Lindgren

ARM: OMAP: Fix warnings in ads7846

Fix various warnings

warning: ignoring return value of 'device_create_file',
declared with attribute warn_unused_result

Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 15bc5db0
......@@ -916,36 +916,54 @@ static int __devinit ads7846_probe(struct spi_device *spi)
* use the other ADC lines a bit differently too
*/
if (ts->model == 7846) {
device_create_file(&spi->dev, &dev_attr_temp0);
device_create_file(&spi->dev, &dev_attr_temp1);
err = device_create_file(&spi->dev, &dev_attr_temp0);
if (err)
goto err_remove_attr7;
err = device_create_file(&spi->dev, &dev_attr_temp1);
if (err)
goto err_remove_attr6;
}
/* in1 == vBAT (7846), or a non-scaled ADC input */
if (ts->model != 7845)
device_create_file(&spi->dev, &dev_attr_in1_input);
if (ts->model != 7845) {
err = device_create_file(&spi->dev, &dev_attr_in1_input);
if (err)
goto err_remove_attr5;
}
/* in0 == a non-scaled ADC input */
device_create_file(&spi->dev, &dev_attr_in0_input);
err = device_create_file(&spi->dev, &dev_attr_in0_input);
if (err)
goto err_remove_attr4;
/* non-hwmon device attributes */
device_create_file(&spi->dev, &dev_attr_pen_down);
device_create_file(&spi->dev, &dev_attr_disable);
err = device_create_file(&spi->dev, &dev_attr_pen_down);
if (err)
goto err_remove_attr3;
err = device_create_file(&spi->dev, &dev_attr_disable);
if (err)
goto err_remove_attr2;
err = input_register_device(input_dev);
if (err)
goto err_remove_attr;
goto err_remove_attr1;
return 0;
err_remove_attr:
err_remove_attr1:
device_remove_file(&spi->dev, &dev_attr_disable);
err_remove_attr2:
device_remove_file(&spi->dev, &dev_attr_pen_down);
err_remove_attr3:
device_remove_file(&spi->dev, &dev_attr_in0_input);
err_remove_attr4:
if (ts->model != 7845)
device_remove_file(&spi->dev, &dev_attr_in1_input);
err_remove_attr5:
if (ts->model == 7846) {
device_remove_file(&spi->dev, &dev_attr_temp1);
err_remove_attr6:
device_remove_file(&spi->dev, &dev_attr_temp0);
}
if (ts->model != 7845)
device_remove_file(&spi->dev, &dev_attr_in1_input);
device_remove_file(&spi->dev, &dev_attr_in0_input);
err_remove_attr7:
free_irq(spi->irq, ts);
err_cleanup_filter:
if (ts->filter_cleanup)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment