Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1951484AbdD3Xdt (ORCPT ); Sun, 30 Apr 2017 19:33:49 -0400 Received: from a2nlsmtp01-03.prod.iad2.secureserver.net ([198.71.225.37]:45508 "EHLO a2nlsmtp01-03.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947773AbdD3Xdk (ORCPT ); Sun, 30 Apr 2017 19:33:40 -0400 X-Greylist: delayed 675 seconds by postgrey-1.27 at vger.kernel.org; Sun, 30 Apr 2017 19:33:40 EDT x-originating-ip: 107.180.71.197 From: kys@exchange.microsoft.com To: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com, leann.ogasawara@canonical.comi, marcelo.cerri@canonical.com, sthemmin@microsoft.com Cc: "K. Y. Srinivasan" Subject: [PATCH 3/6] Drivers: hv: vmbus: Fix error code returned by vmbus_post_msg() Date: Sun, 30 Apr 2017 16:21:16 -0700 Message-Id: <1493594479-25329-3-git-send-email-kys@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1493594420-25214-1-git-send-email-kys@exchange.microsoft.com> References: <1493594420-25214-1-git-send-email-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfJTrXhuxN5DR+9QpOQQByJC1nyWIJvwwr+pij1XBhzNC71bT8W9YqLVHokAEkkI4Z+hjZZNp66mr5KzXpXQWOWP4xy6bAH25cIT6hTqM6Xgd6+RwdI3w 4Pddzxl/eUcHF46AvxX+1L1T07hh8k90xWSzrKqT3AnZJCA5JnoFXnVUl+AC68R912jamG4b+6JfOaZsm3e1NHjIjROOatpfb+uB+eMr38L5BPGlm1nBG/uU nfHILyufYEB5sCzsZb1Y2NmwcCdGCsJ26iXJztxL9oKPrzZJt+avf4D8KYUrnoL98Kx3wNNfDbYiNN5uCKgDUjt9qaWY/hvF2eeIeUhCwOYHxziPHPOvdBvZ CmJpXM92TRYpI6tewoBS7chNfaFb7gy+2Wwc5+f0JJAMqPI1VE/v79+NAJZDpGZwF3C4F67sIHRyG2s0IjULQ30XLqY9Iz8tNq72W1b7xQFoO9uNkshpWWcB amIH8y2nKpRPkopDYM8YrmOwA17+wYGLvHQZBdiH6VfNEL4u08VZFAmwXFM= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 771 Lines: 26 From: K. Y. Srinivasan ENOBUFS is a more approrpiate error code to be returned when the hypervisor cannot post the message because of insufficient buffers. Make the adjustment. Signed-off-by: K. Y. Srinivasan --- drivers/hv/connection.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index fce27fb..a938fcf 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -370,7 +370,7 @@ int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep) break; case HV_STATUS_INSUFFICIENT_MEMORY: case HV_STATUS_INSUFFICIENT_BUFFERS: - ret = -ENOMEM; + ret = -ENOBUFS; break; case HV_STATUS_SUCCESS: return ret; -- 1.7.1