From patchwork Thu Sep 17 09:31:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7204231 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C784BEEC1 for ; Thu, 17 Sep 2015 09:31:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8886C207B3 for ; Thu, 17 Sep 2015 09:31:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 93F1120719 for ; Thu, 17 Sep 2015 09:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513AbbIQJbe (ORCPT ); Thu, 17 Sep 2015 05:31:34 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:29090 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754481AbbIQJbc (ORCPT ); Thu, 17 Sep 2015 05:31:32 -0400 Received: from HNOCHT01.corp.atmel.com (10.161.30.161) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 17 Sep 2015 11:31:25 +0200 Received: from [10.249.2.172] (10.161.30.18) by HNOCHT01.corp.atmel.com (10.161.30.161) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 17 Sep 2015 11:31:30 +0200 Subject: Re: [PATCH 1/4] staging: wilc1000: Modify null check routine To: Nicolas Ferre , References: <1442479806-10737-1-git-send-email-tony.cho@atmel.com> <55FA8299.5060606@atmel.com> CC: , , , , , , , , , From: Tony Cho Message-ID: <55FA8870.4080301@atmel.com> Date: Thu, 17 Sep 2015 18:31:28 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55FA8299.5060606@atmel.com> X-Originating-IP: [10.161.30.18] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 On 2015? 09? 17? 18:06, Nicolas Ferre wrote: > Le 17/09/2015 10:50, Tony Cho a écrit : >> From: Leo Kim >> >> This patch modify null check routine. >> - Null check error non return. (Handle_RcvdGnrlAsyncInfo) > It doesn't parse... > > Is it fixing a bug? What were the consequences without the return? > > Bye, I think commit log is not enough to explain what this commit is. I will resend this series of patch as v2. do you have any concern? Thanks, Tony. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 6fdf392..a9eaa8f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -2403,8 +2403,10 @@ static s32 Handle_RcvdGnrlAsyncInfo(tstrWILC_WFIDrv *drvHandler, tstrRcvdGnrlAsy s32 s32Err = 0; tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler; - if (pstrWFIDrv == NULL) + if (!pstrWFIDrv) { PRINT_ER("Driver handler is NULL\n"); + return -EFAULT; + } PRINT_D(GENERIC_DBG, "Current State = %d,Received state = %d\n", pstrWFIDrv->enuHostIFstate, pstrRcvdGnrlAsyncInfo->pu8Buffer[7]);