lkml.org 
[lkml]   [2016]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/10] firewire-net: Adjust checks for null pointers in five functions
On Sep 18 SF Markus Elfring wrote:
> The script "checkpatch.pl" can point information out like the following.

A side note: checkpatch.pl is for authors to help prepare their
submissions of new code (or their refactoring of existing code if for some
reason a refactoring is undertaken).

> Comparison to NULL could be written !…

Yes it could, or it could remain as is. Both styles are used in
drivers/firewire/net.c, so it is indeed preferable to normalize it to one
of them. I keep your patch for the next occasion when related work is
being done on drivers/firewire/net.c or drivers/firewire.

> Thus fix the affected source code places.

It is not a "fix", it is a stylistic change.

> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/firewire/net.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
> index eb7ce5e..e313be3 100644
> --- a/drivers/firewire/net.c
> +++ b/drivers/firewire/net.c
> @@ -366,13 +366,13 @@ static struct fwnet_partial_datagram *fwnet_pd_new(struct net_device *net,
>
> INIT_LIST_HEAD(&new->fi_list);
> fi = fwnet_frag_new(new, frag_off, frag_len);
> - if (fi == NULL)
> + if (!fi)
> goto free_new;
[...]
--
Stefan Richter
-======----- =--= ==---
http://arcgraph.de/sr/

\
 
 \ /
  Last update: 2016-09-24 14:07    [W:0.883 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site