提交 aeef010a 编写于 作者: M Mike Marciniszyn 提交者: Doug Ledford

IB/hfi1: fix sdma_descq_cnt parameter parsing

The boolean tests should have been or-ed.
Reported-by: NDavid Binderman <dcb314@hotmail.com>
Reviewed-by: NJubin John <jubin.john@intel.com>
Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 e1df0068
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册