ASoC: AD1836: drop unnecessary spi register check
authorMike Frysinger <vapier@gentoo.org>
Wed, 15 Jun 2011 19:29:19 +0000 (15:29 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 16 Jun 2011 10:41:46 +0000 (11:41 +0100)
The only thing the init func does is register a spi driver, so if that
fails, we return the value back up to the caller who will display an
error message for us.  So drop the redundant checking/message.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/ad1836.c

index ff8e73850ed52f552beedf8d333dd0f317f2f2cc..e8a986f84c138d229670a5fcdb7c0bd6ec3a6147 100644 (file)
@@ -385,15 +385,7 @@ static struct spi_driver ad1836_spi_driver = {
 
 static int __init ad1836_init(void)
 {
-       int ret;
-
-       ret = spi_register_driver(&ad1836_spi_driver);
-       if (ret != 0) {
-               printk(KERN_ERR "Failed to register ad1836 SPI driver: %d\n",
-                               ret);
-       }
-
-       return ret;
+       return spi_register_driver(&ad1836_spi_driver);
 }
 module_init(ad1836_init);