vmw_balloon: Print errors on reset only once
authorNadav Amit <namit@vmware.com>
Tue, 22 Mar 2022 17:00:52 +0000 (17:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Apr 2022 15:24:06 +0000 (17:24 +0200)
The VMware balloon might be reset multiple times during execution. Print
errors only once to avoid filling the log unnecessarily.

Signed-off-by: Nadav Amit <namit@vmware.com>
Link: https://lore.kernel.org/r/20220322170052.6351-1-namit@vmware.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_balloon.c

index f1d8ba6d485741336d48382dc00dd2d59f4fe630..086ce77d9074e5aa4f7421ae738c3c69530ecb22 100644 (file)
@@ -1452,10 +1452,10 @@ static void vmballoon_reset(struct vmballoon *b)
 
        error = vmballoon_vmci_init(b);
        if (error)
-               pr_err("failed to initialize vmci doorbell\n");
+               pr_err_once("failed to initialize vmci doorbell\n");
 
        if (vmballoon_send_guest_id(b))
-               pr_err("failed to send guest ID to the host\n");
+               pr_err_once("failed to send guest ID to the host\n");
 
 unlock:
        up_write(&b->conf_sem);