git: 4196186dbfd0 - main - hyperv/vmbus: Flip a message to only be emitted on failure

From: Li-Wen Hsu <lwhsu_at_FreeBSD.org>
Date: Mon, 11 Sep 2023 08:55:24 UTC
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/src/commit/?id=4196186dbfd0949cfa2c51979fb169b7a79a80e4

commit 4196186dbfd0949cfa2c51979fb169b7a79a80e4
Author:     Li-Wen Hsu <lwhsu@FreeBSD.org>
AuthorDate: 2023-09-11 08:51:46 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2023-09-11 08:51:46 +0000

    hyperv/vmbus: Flip a message to only be emitted on failure
    
    This message is not very useful when things are working well.
    Flip its meaning and let it only be emitted on failure.
    
    While here, pet style(9).
    
    Reviewed by:    mhorne, whu
    Differential Revision:  https://reviews.freebsd.org/D41788
---
 sys/dev/hyperv/pcib/vmbus_pcib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c
index da722eb0b834..ee7b82c10f23 100644
--- a/sys/dev/hyperv/pcib/vmbus_pcib.c
+++ b/sys/dev/hyperv/pcib/vmbus_pcib.c
@@ -1705,9 +1705,9 @@ vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
 	if (res == NULL && start + count - 1 == end)
 		res = bus_generic_alloc_resource(dev, child, type, rid,
 		    start, end, count, flags);
-	if (res) {
-		device_printf(dev,"vmbus_pcib_alloc_resource is successful\n");
-	}
+	if (res == NULL)
+		device_printf(dev, "vmbus_pcib_alloc_resource failed\n");
+
 	return (res);
 }