]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/arm/aspeed_ast27x0-fc: Drop dead return checks
authorJamin Lin <jamin_lin@aspeedtech.com>
Thu, 25 Sep 2025 05:05:31 +0000 (13:05 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 29 Sep 2025 16:00:20 +0000 (18:00 +0200)
commit8d3aaefdb3bb13df7c57091a4319f3afe3c351ac
tree26f567d1779e2e0dbdc8c8ea8cdefca5d9b31e80
parentecabf8ba94961a23f473e7060f8589e93967cfd2
hw/arm/aspeed_ast27x0-fc: Drop dead return checks

1. object_property_set_link() can return false only when it fails, and it
sets an error when it fails. Since passing &error_abort causes an abort,
the function never returns false, and the return statement is effectively
dead code.
2. object_property_set_int() is considered as a routine which shouldn't fail.
So the common practice in models is to pass &error_abort and ignore the returned value.
https://patchwork.kernel.org/project/qemu-devel/patch/20250717034054.1903991-3-jamin_lin@aspeedtech.com/#26540626

No functional change.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925050535.2657256-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/arm/aspeed_ast27x0-fc.c