On 29/11/25 14:43, Vladimir Sementsov-Ogievskiy wrote:
Accordingly with recommendations in include/qapi/error.h accompany
errp by boolean return value and get rid of error propagation.
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
chardev/char.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
- if (cc->chr_open) {
- cc->chr_open(chr, backend, errp);
+ if (cc->chr_open && !cc->chr_open(chr, backend, errp)) {
+ return false;
}
+
+ return true;
}
Alternatively:
if (!cc->chr_open) {
return true;
}
return cc->chr_open(chr, backend, errp);
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>