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

Commit 659181ae authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'omap-for-v4.2/fixes-rc6' of...

Merge tag 'omap-for-v4.2/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Fix a NULL pointer exception for omap GPMC bus code if probe fails.

* tag 'omap-for-v4.2/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap

:
  memory: omap-gpmc: Don't try to save uninitialized GPMC context

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents db553505 e984a179
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2245,6 +2245,9 @@ void omap3_gpmc_save_context(void)
{
	int i;

	if (!gpmc_base)
		return;

	gpmc_context.sysconfig = gpmc_read_reg(GPMC_SYSCONFIG);
	gpmc_context.irqenable = gpmc_read_reg(GPMC_IRQENABLE);
	gpmc_context.timeout_ctrl = gpmc_read_reg(GPMC_TIMEOUT_CONTROL);
@@ -2277,6 +2280,9 @@ void omap3_gpmc_restore_context(void)
{
	int i;

	if (!gpmc_base)
		return;

	gpmc_write_reg(GPMC_SYSCONFIG, gpmc_context.sysconfig);
	gpmc_write_reg(GPMC_IRQENABLE, gpmc_context.irqenable);
	gpmc_write_reg(GPMC_TIMEOUT_CONTROL, gpmc_context.timeout_ctrl);