Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4b4ecbd authored by Josh Cartwright's avatar Josh Cartwright Committed by Olof Johansson
Browse files

ARM: msm: trout: fix uninit var warning



Fix the following warning when !CONFIG_MMC:

arch/arm/mach-msm/board-trout.c: In function 'trout_init':
arch/arm/mach-msm/board-trout.c:67:6: warning: unused variable 'rc' [-Wunused-variable]
  int rc;
      ^

Also, while we're here, rework explicit printk(KERN_CRIT..) to use
pr_crit.

Signed-off-by: default avatarJosh Cartwright <joshc@codeaurora.org>
Signed-off-by: default avatarDavid Brown <davidb@codeaurora.org>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent 374b1057
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
 * GNU General Public License for more details.
 *
 */
#define pr_fmt(fmt) "%s: " fmt, __func__

#include <linux/kernel.h>
#include <linux/init.h>
@@ -68,12 +69,11 @@ static void __init trout_init(void)

	platform_add_devices(devices, ARRAY_SIZE(devices));

#ifdef CONFIG_MMC
	if (IS_ENABLED(CONFIG_MMC)) {
		rc = trout_init_mmc(system_rev);
		if (rc)
                printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc);
#endif

			pr_crit("MMC init failure (%d)\n", rc);
	}
}

static struct map_desc trout_io_desc[] __initdata = {