Skip to content

Commit

Permalink
pspat: fix check on initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaffione committed Jan 4, 2018
1 parent 1b0b304 commit 261be66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/pspat/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pspat_mb_init(struct pspat_mailbox *m, const char *name,
unsigned long entries_per_line;

if (!is_power_of_2(entries) || !is_power_of_2(line_size) ||
entries <= 2 * line_size || line_size < sizeof(uintptr_t))
entries * sizeof(uintptr_t) <= 2 * line_size || line_size < sizeof(uintptr_t))
return -EINVAL;

strncpy(m->name, name, PSPAT_MB_NAMSZ);
Expand Down

0 comments on commit 261be66

Please sign in to comment.