Commit 5cbca957 authored by Roberta Dobrescu's avatar Roberta Dobrescu Committed by Greg Kroah-Hartman

staging: emxx_udc: Do not use comparisons on bool tests

This fixes the following coccinelle warning:
WARNING: Comparison of bool to 0/1
Signed-off-by: default avatarRoberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1a366abe
......@@ -2009,8 +2009,7 @@ static inline void _nbu2ss_epn_in_int(
result = _nbu2ss_epn_in_transfer(udc, ep, req);
} else {
if ((req->zero != 0)
&& ((req->req.actual % ep->ep.maxpacket) == 0)) {
if (req->zero && ((req->req.actual % ep->ep.maxpacket) == 0)) {
status =
_nbu2ss_readl(&preg->EP_REGS[ep->epnum-1].EP_STATUS);
......@@ -2097,8 +2096,7 @@ static inline void _nbu2ss_epn_out_dma_int(
num = ep->epnum - 1;
if (req->req.actual == req->req.length) {
if ((req->req.length % ep->ep.maxpacket)
&& (req->zero == 0)) {
if ((req->req.length % ep->ep.maxpacket) && !req->zero) {
req->div_len = 0;
req->dma_flag = FALSE;
_nbu2ss_ep_done(ep, req, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment