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>
This commit is contained in:
parent
c3019efc71
commit
ad280559c6
@ -214,6 +214,11 @@ typedef struct PowerDevice {
|
|||||||
} PowerDevice;
|
} PowerDevice;
|
||||||
|
|
||||||
/* Power */
|
/* Power */
|
||||||
|
static uint64_t power_mem_read(void *opaque, hwaddr addr, unsigned size)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void power_mem_write(void *opaque, hwaddr addr,
|
static void power_mem_write(void *opaque, hwaddr addr,
|
||||||
uint64_t val, unsigned size)
|
uint64_t val, unsigned size)
|
||||||
{
|
{
|
||||||
@ -224,6 +229,7 @@ static void power_mem_write(void *opaque, hwaddr addr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const MemoryRegionOps power_mem_ops = {
|
static const MemoryRegionOps power_mem_ops = {
|
||||||
|
.read = power_mem_read,
|
||||||
.write = power_mem_write,
|
.write = power_mem_write,
|
||||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||||
.valid = {
|
.valid = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user