mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 10:34:22 -04:00
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: Olof Johansson <olof@lixom.net>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user