lkml.org 
[lkml]   [2013]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: ethernet: ti: remove redundant NULL check.
On 02/12/2013 11:06 PM, David Miller wrote:
> From: Cyril Roelandt<tipecaml@gmail.com>
> Date: Tue, 12 Feb 2013 22:54:46 +0100
>
>> cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
>> cpdma_ctlr_destroy() can safely be removed.
>>
>> Signed-off-by: Cyril Roelandt<tipecaml@gmail.com>
> ...
>> @@ -450,8 +450,7 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
>> cpdma_ctlr_stop(ctlr);
>>
>> for (i = 0; i< ARRAY_SIZE(ctlr->channels); i++) {
>> - if (ctlr->channels[i])
>> - cpdma_chan_destroy(ctlr->channels[i]);
>> + cpdma_chan_destroy(ctlr->channels[i]);
>> }
>
> SInce this is now a single statement basic block, remove the
> surrounding braces.

Ok, I resent, though I forgot to add "v2".

Regards,
Cyril Roelandt.


\
 
 \ /
  Last update: 2013-02-13 00:42    [W:0.152 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site