OSDN Git Service

macfb: update macfb.c to use the Error API best practices
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 7 Oct 2021 22:12:42 +0000 (23:12 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 8 Oct 2021 11:31:02 +0000 (13:31 +0200)
commitc047862acd502c305fbdc66a4a3fd717c04fa6d2
tree2e32a43a06e2b71e9a06a6b8604a6ef0e3930069
parent7437b13eacfd05ed6817c2f05c4712ed618544e1
macfb: update macfb.c to use the Error API best practices

As per the current Error API best practices, change macfb_commom_realize() to return
a boolean indicating success to reduce errp boiler-plate handling code. Note that
memory_region_init_ram_nomigrate() is also updated to use &error_abort to indicate
a non-recoverable error, matching the behaviour recommended after similar
discussions on memory API failures for the recent nubus changes.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211007221253.29024-3-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/display/macfb.c