diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-09-16 16:01:59 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-17 12:31:33 (GMT) |
commit | 0c4a9f6e0ac55db62816bfa5e584ed807540a5ee (patch) | |
tree | d3114fc909500485328a802cc5f41efcbb951056 /drivers/staging/silicom/bp_mod.c | |
parent | ad139634c50999ab4007a2d83afe96cc500b0afd (diff) | |
download | linux-fsl-qoriq-0c4a9f6e0ac55db62816bfa5e584ed807540a5ee.tar.xz |
staging: silicom: fix a comparing proc_dir_entry pointer against 0
we should be using the NULL macro, not 0 to compare against
a pointer value, and also remove braces around the single
if conditional after the create_proc_entry
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/silicom/bp_mod.c')
-rw-r--r-- | drivers/staging/silicom/bp_mod.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/silicom/bp_mod.c b/drivers/staging/silicom/bp_mod.c index f138d29..2722da9 100644 --- a/drivers/staging/silicom/bp_mod.c +++ b/drivers/staging/silicom/bp_mod.c @@ -7725,10 +7725,8 @@ bypass_proc_create_entry_sd(struct pfs_unit_sd *pfs_unit_curr, S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, parent_pfs); - if (pfs_unit_curr->proc_entry == 0) { - + if (pfs_unit_curr->proc_entry == NULL) return -1; - } pfs_unit_curr->proc_entry->read_proc = read_proc; pfs_unit_curr->proc_entry->write_proc = write_proc; |