Skip to content

Commit

Permalink
IB/hfi1: fix sdma_descq_cnt parameter parsing
Browse files Browse the repository at this point in the history
The boolean tests should have been or-ed.

Reported-by: David Binderman <dcb314@hotmail.com>
Reviewed-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Mike Marciniszyn authored and Doug Ledford committed Sep 18, 2015
1 parent e1df006 commit aeef010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rdma/hfi1/sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ u16 sdma_get_descq_cnt(void)
*/
if (!is_power_of_2(count))
return SDMA_DESCQ_CNT;
if (count < 64 && count > 32768)
if (count < 64 || count > 32768)
return SDMA_DESCQ_CNT;
return count;
}
Expand Down

0 comments on commit aeef010

Please sign in to comment.