Skip to content

Commit

Permalink
staging: silicom: fix a comparing proc_dir_entry pointer against 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Sep 17, 2012
1 parent ad13963 commit 0c4a9f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/silicom/bp_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0c4a9f6

Please sign in to comment.