sun4u: add power_mem_read routine

Define skeleton 'power_mem_read' routine. Avoid NULL dereference.

Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
(cherry picked from commit ad280559c6)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
stable-3.1
Prasad J Pandit 2019-01-04 15:19:10 +05:30 committed by Michael Roth
parent 3be7eb2f47
commit 59a823017a
1 changed files with 6 additions and 0 deletions

View File

@ -214,6 +214,11 @@ typedef struct PowerDevice {
} PowerDevice;
/* Power */
static uint64_t power_mem_read(void *opaque, hwaddr addr, unsigned size)
{
return 0;
}
static void power_mem_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
@ -224,6 +229,7 @@ static void power_mem_write(void *opaque, hwaddr addr,
}
static const MemoryRegionOps power_mem_ops = {
.read = power_mem_read,
.write = power_mem_write,
.endianness = DEVICE_NATIVE_ENDIAN,
.valid = {