From patchwork Mon Aug 17 13:44:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 7025161 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0F3B69F373 for ; Mon, 17 Aug 2015 13:44:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3ABD420690 for ; Mon, 17 Aug 2015 13:44:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 398982068F for ; Mon, 17 Aug 2015 13:44:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754965AbbHQNos (ORCPT ); Mon, 17 Aug 2015 09:44:48 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36170 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754751AbbHQNor (ORCPT ); Mon, 17 Aug 2015 09:44:47 -0400 Received: by pawq9 with SMTP id q9so11368252paw.3 for ; Mon, 17 Aug 2015 06:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zEmJZNazFxIgUN2MlaH5D/ML4V3pL5rwULl6KdGBMpU=; b=p6mnQe5QkO8xzd4sGzEbQdum4Qrewqm8osaZRUZfyM3Ul4kD2bDTYrJmAq4cioCLb+ u/w/mXcOc28FA1+1/xUFj7/I0sWjocDgTBB3iQJNliW0d3tMudMlZDT19xrspmDydbRP Ebf04ntraVsOfc1RFVkJNy6Cw+Tsok9KMjxvav9OoL49TtALgIjbbgxgkrTqIKvz6ZR1 +D0QLU8xAzFMBSVNg45xw6uBuLxXVjx3QiAXLTpevyfxiJdygnPOckhNm1EGVPbuW3WE VVzqWYOlTvD+bHBA2obLvH62VWEmr7MYvANAj9yY2NQduEhGmPlK9LUSUWe+dSzvX9+M SkJA== X-Received: by 10.68.117.173 with SMTP id kf13mr2867829pbb.96.1439819087471; Mon, 17 Aug 2015 06:44:47 -0700 (PDT) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id qp13sm14761687pbb.9.2015.08.17.06.44.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Aug 2015 06:44:47 -0700 (PDT) From: Chaehyun Lim To: gregkh@linuxfoundation.org Cc: johnny.kim@atmel.com, rachel.kim@atmel.com, dean.lee@atmel.com, chris.park@atmel.com, linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Chaehyun Lim Subject: [PATCH 4/4] staging: wilc1000: return -EINVAL for invalid argument checking Date: Mon, 17 Aug 2015 22:44:31 +0900 Message-Id: <1439819071-30000-4-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439819071-30000-1-git-send-email-chaehyun.lim@gmail.com> References: <1439819071-30000-1-git-send-email-chaehyun.lim@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch uses -EINVAL for invalid argument checking instead of using WILC_ERRORREPORT with WILC_INVALID_ARGUMENT. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/wilc_msgqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index dd87448..561ff88 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -61,7 +61,7 @@ s32 WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle, Message *pstrMessage = NULL; if ((pHandle == NULL) || (u32SendBufferSize == 0) || (pvSendBuffer == NULL)) { - WILC_ERRORREPORT(s32RetStatus, WILC_INVALID_ARGUMENT); + return -EINVAL; } if (pHandle->bExiting == true) { @@ -128,7 +128,7 @@ s32 WILC_MsgQueueRecv(WILC_MsgQueueHandle *pHandle, unsigned long flags; if ((pHandle == NULL) || (u32RecvBufferSize == 0) || (pvRecvBuffer == NULL) || (pu32ReceivedLength == NULL)) { - WILC_ERRORREPORT(s32RetStatus, WILC_INVALID_ARGUMENT); + return -EINVAL; } if (pHandle->bExiting == true) {