From: Dan Carpenter <dan.carpenter@oracle.com>
To: Tony Cho <tony.cho@atmel.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
rachel.kim@atmel.com, chris.park@atmel.com,
austin.shin@atmel.com, linux-wireless@vger.kernel.org,
johnny.kim@atmel.com, Nicolas.FERRE@atmel.com,
adel.noureldin@atmel.com, leo.kim@atmel.com,
adham.abozaeid@atmel.com
Subject: Re: [PATCH 40/40] staging: wilc1000: fixes comparison to NULL could be written
Date: Thu, 15 Oct 2015 16:23:03 +0300 [thread overview]
Message-ID: <20151015132303.GA7340@mwanda> (raw)
In-Reply-To: <1444883121-31757-40-git-send-email-tony.cho@atmel.com>
On Thu, Oct 15, 2015 at 01:25:21PM +0900, Tony Cho wrote:
> @@ -2306,7 +2303,8 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv,
> strWID.type = WID_BIN;
> strWID.size = pstrSetBeaconParam->head_len + pstrSetBeaconParam->tail_len + 16;
> strWID.val = kmalloc(strWID.size, GFP_KERNEL);
> - if (strWID.val == NULL)
> +
> + if (!strWID.val)
> goto ERRORHANDLER;
>
> pu8CurrByte = strWID.val;
This patch is fine, but an unrelated comment is that, in wilc1000 the
pattern is to put a blank line between the allocation and the error
check but that's the wrong thing. The allocation and the check are part
of the same step and they should go next to each other.
regards,
dan carpenter
prev parent reply other threads:[~2015-10-15 13:23 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 4:24 [PATCH 01/40] staging: wilc1000: rename ssidLen of struct join_bss_param Tony Cho
2015-10-15 4:24 ` [PATCH 02/40] staging: wilc1000: rename u8NoaEnbaled " Tony Cho
2015-10-15 4:24 ` [PATCH 03/40] staging: wilc1000: rename u8OppEnable " Tony Cho
2015-10-15 4:24 ` [PATCH 04/40] staging: wilc1000: rename u8CtWindow " Tony Cho
2015-10-15 4:24 ` [PATCH 05/40] staging: wilc1000: rename u8Count " Tony Cho
2015-10-15 4:24 ` [PATCH 06/40] staging: wilc1000: rename u8Index " Tony Cho
2015-10-15 4:24 ` [PATCH 07/40] staging: wilc1000: rename au8Duration " Tony Cho
2015-10-15 4:24 ` [PATCH 08/40] staging: wilc1000: rename au8Interval " Tony Cho
2015-10-15 4:24 ` [PATCH 09/40] staging: wilc1000: rename au8StartTime " Tony Cho
2015-10-15 4:24 ` [PATCH 10/40] staging: wilc1000: remove unused variable gWFiDrvHandle Tony Cho
2015-10-15 4:24 ` [PATCH 11/40] staging: wilc1000: rename variable HostIFthreadHandler Tony Cho
2015-10-15 4:24 ` [PATCH 12/40] staging: wilc1000: rename variable gMsgQHostIF Tony Cho
2015-10-15 4:24 ` [PATCH 13/40] staging: wilc1000: rename variable hSemHostIFthrdEnd Tony Cho
2015-10-15 4:24 ` [PATCH 14/40] staging: wilc1000: rename variable hSemDeinitDrvHandle Tony Cho
2015-10-15 6:07 ` [RFC PATCH] staging: wilc1000: hif_sema_driver can be static kbuild test robot
2015-10-15 6:07 ` [PATCH 14/40] staging: wilc1000: rename variable hSemDeinitDrvHandle kbuild test robot
2015-10-15 4:24 ` [PATCH 15/40] staging: wilc1000: rename variable hWaitResponse Tony Cho
2015-10-15 4:24 ` [PATCH 16/40] staging: wilc1000: rename variable hSemHostIntDeinit Tony Cho
2015-10-15 6:21 ` kbuild test robot
2015-10-15 6:21 ` [RFC PATCH] staging: wilc1000: hif_sema_deinit can be static kbuild test robot
2015-10-15 4:24 ` [PATCH 17/40] staging: wilc1000: rename variable g_hPeriodicRSSI Tony Cho
2015-10-15 6:32 ` [RFC PATCH] staging: wilc1000: periodic_rssi can be static kbuild test robot
2015-10-15 6:32 ` [PATCH 17/40] staging: wilc1000: rename variable g_hPeriodicRSSI kbuild test robot
2015-10-15 4:24 ` [PATCH 18/40] staging: wilc1000: rename variable gapu8RcvdAssocResp Tony Cho
2015-10-15 4:25 ` [PATCH 19/40] staging: wilc1000: rename variable gbScanWhileConnected Tony Cho
2015-10-15 6:46 ` kbuild test robot
2015-10-15 6:46 ` [RFC PATCH] staging: wilc1000: scan_while_connected can be static kbuild test robot
2015-10-15 4:25 ` [PATCH 20/40] staging: wilc1000: rename variable gs8Rssi Tony Cho
2015-10-15 4:25 ` [PATCH 21/40] staging: wilc1000: rename variable gs8lnkspd Tony Cho
2015-10-15 4:25 ` [PATCH 22/40] staging: wilc1000: rename variable gu8Chnl Tony Cho
2015-10-15 4:25 ` [PATCH 23/40] staging: wilc1000: rename variable gs8SetIP Tony Cho
2015-10-15 4:25 ` [PATCH 24/40] staging: wilc1000: rename variable gs8GetIP Tony Cho
2015-10-15 4:25 ` [PATCH 25/40] staging: wilc1000: rename variable gu32InactiveTime Tony Cho
2015-10-15 4:25 ` [PATCH 26/40] staging: wilc1000: rename variable gu8DelBcn Tony Cho
2015-10-15 4:25 ` [PATCH 27/40] staging: wilc1000: remove unused variable gu32WidConnRstHack Tony Cho
2015-10-15 4:25 ` [PATCH 28/40] staging: wilc1000: rename variable gu8FlushedJoinReq Tony Cho
2015-10-15 7:04 ` kbuild test robot
2015-10-15 7:04 ` [RFC PATCH] staging: wilc1000: join_req can be static kbuild test robot
2015-10-15 4:25 ` [PATCH 29/40] staging: wilc1000: rename variable gu8FlushedInfoElemAsoc Tony Cho
2015-10-15 4:25 ` [PATCH 30/40] staging: wilc1000: rename variable gu8Flushed11iMode Tony Cho
2015-10-15 7:18 ` [RFC PATCH] staging: wilc1000: mode_11i can be static kbuild test robot
2015-10-15 7:18 ` [PATCH 30/40] staging: wilc1000: rename variable gu8Flushed11iMode kbuild test robot
2015-10-15 4:25 ` [PATCH 31/40] staging: wilc1000: rename variable gu8FlushedAuthType Tony Cho
2015-10-15 4:25 ` [PATCH 32/40] staging: wilc1000: rename variable gu32FlushedJoinReqSize Tony Cho
2015-10-15 7:32 ` kbuild test robot
2015-10-15 4:25 ` [PATCH 33/40] staging: wilc1000: rename variable gu32FlushedInfoElemAsocSize Tony Cho
2015-10-15 7:47 ` kbuild test robot
2015-10-15 7:47 ` [RFC PATCH] staging: wilc1000: info_element_size can be static kbuild test robot
2015-10-15 4:25 ` [PATCH 34/40] staging: wilc1000: rename variable gu8FlushedJoinReqDrvHandler Tony Cho
2015-10-15 7:59 ` [RFC PATCH] staging: wilc1000: join_req_drv can be static kbuild test robot
2015-10-15 7:59 ` [PATCH 34/40] staging: wilc1000: rename variable gu8FlushedJoinReqDrvHandler kbuild test robot
2015-10-15 4:25 ` [PATCH 35/40] staging: wilc1000: rename variable s32Error Tony Cho
2015-10-17 4:56 ` Greg KH
2015-10-19 1:43 ` Tony Cho
2015-10-15 4:25 ` [PATCH 36/40] staging: wilc1000: move variable clients_count Tony Cho
2015-10-15 4:25 ` [PATCH 37/40] staging: wilc1000: move variable FALSE_FRMWR_CHANNEL Tony Cho
2015-10-15 4:25 ` [PATCH 38/40] staging: wilc1000: fixes unnecessary variable replacement Tony Cho
2015-10-15 4:25 ` [PATCH 39/40] staging: wilc1000: fixes alignment should match open parenthesis Tony Cho
2015-10-15 4:25 ` [PATCH 40/40] staging: wilc1000: fixes comparison to NULL could be written Tony Cho
2015-10-15 13:23 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151015132303.GA7340@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Nicolas.FERRE@atmel.com \
--cc=adel.noureldin@atmel.com \
--cc=adham.abozaeid@atmel.com \
--cc=austin.shin@atmel.com \
--cc=chris.park@atmel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johnny.kim@atmel.com \
--cc=leo.kim@atmel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rachel.kim@atmel.com \
--cc=tony.cho@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).