From patchwork Thu Jul 14 21:29:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franky Lin X-Patchwork-Id: 976312 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6ELWYQZ011148 for ; Thu, 14 Jul 2011 21:32:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932462Ab1GNVb3 (ORCPT ); Thu, 14 Jul 2011 17:31:29 -0400 Received: from mms1.broadcom.com ([216.31.210.17]:4307 "EHLO mms1.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932390Ab1GNV34 (ORCPT ); Thu, 14 Jul 2011 17:29:56 -0400 Received: from [10.9.200.133] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Thu, 14 Jul 2011 14:34:50 -0700 X-Server-Uuid: 02CED230-5797-4B57-9875-D5D2FEE4708A Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB02.corp.ad.broadcom.com (10.9.200.133) with Microsoft SMTP Server id 8.2.247.2; Thu, 14 Jul 2011 14:29:24 -0700 Received: from mail-sj1-12.sj.broadcom.com (mail-sj1-12.sj.broadcom.com [10.17.16.106]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 8EF6174D07; Thu, 14 Jul 2011 14:29:37 -0700 (PDT) Received: from lc-sj1-3560.broadcom.com (lc-sj1-3560.sj.broadcom.com [10.17.194.250]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id AA71120517; Thu, 14 Jul 2011 14:29:33 -0700 (PDT) Received: by lc-sj1-3560.broadcom.com (Postfix, from userid 25250) id 691B32C19D20; Thu, 14 Jul 2011 14:29:31 -0700 (PDT) From: "Franky Lin" To: gregkh@suse.de cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org Subject: [PATCH 21/35] staging: brcm80211: use native error code in brcmf_c_pattern_atoh() Date: Thu, 14 Jul 2011 14:29:17 -0700 Message-ID: <1310678971-28952-22-git-send-email-frankyl@broadcom.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1310678971-28952-1-git-send-email-frankyl@broadcom.com> References: <1310678971-28952-1-git-send-email-frankyl@broadcom.com> MIME-Version: 1.0 X-WSS-ID: 6201BF733B420695917-08-01 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 14 Jul 2011 21:32:34 +0000 (UTC) From: Arend van Spriel The function brcmf_c_pattern_atoh() returned meaningless -1 value. These have been replaced by linux error code -EINVAL. Signed-off-by: Arend van Spriel Reviewed-by: Roland Vossen Reviewed-by: Franky Lin --- drivers/staging/brcm80211/brcmfmac/dhd_common.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c index 1e757b7..4412893 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c @@ -841,12 +841,12 @@ static int brcmf_c_pattern_atoh(char *src, char *dst) int i; if (strncmp(src, "0x", 2) != 0 && strncmp(src, "0X", 2) != 0) { BRCMF_ERROR(("Mask invalid format. Needs to start with 0x\n")); - return -1; + return -EINVAL; } src = src + 2; /* Skip past 0x */ if (strlen(src) % 2 != 0) { BRCMF_ERROR(("Mask invalid format. Length must be even.\n")); - return -1; + return -EINVAL; } for (i = 0; *src != '\0'; i++) { char num[3];