lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180729143338.2251-1-tsotsos@gmail.com>
Date:   Sun, 29 Jul 2018 17:33:38 +0300
From:   Georgios Tsotsos <tsotsos@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Georgios Tsotsos <tsotsos@...il.com>,
        Aaro Koskinen <aaro.koskinen@....fi>,
        James Hogan <jhogan@...nel.org>, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH v4 1/1] Staging: octeon-usb: Using defined error codes and applying coding style

Replaced -1 with defined error code EINVAL

Signed-off-by: Georgios Tsotsos <tsotsos@...il.com>
---
v2: Apply coding style to function cvmx_usb_poll_channel
v3: Break down function cvmx_usb_poll_channel
v4: Return defined error code and applying coding style for function calls
 drivers/staging/octeon-usb/octeon-hcd.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 3f44ac260eff..edf87d1b3609 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -2590,6 +2590,7 @@ static void cvmx_usb_transfer_isoc(struct octeon_hcd *usb,
 		}
 	} else {
 		pipe->next_tx_frame += pipe->interval;
+
 		cvmx_usb_complete(usb, pipe, transaction, CVMX_USB_STATUS_OK);
 	}
 }
@@ -2624,16 +2625,16 @@ static int cvmx_usb_dma_halt(u32 hcchar_chena, u32 hcint_xfercompl,
 		cvmx_usb_write_csr32(usb,
 				     CVMX_USBCX_HCCHARX(channel, usb->index),
 				     usbc_hcchar.u32);
-		return -1;
+		return -EINVAL;
 	} else if (hcint_xfercompl) {
 		/*
 		 * Successful IN/OUT with transfer complete.
 		 * Channel halt isn't needed.
 		 */
 	} else {
-		dev_err(dev, "USB%d: Channel %d interrupt without halt\n",
+		dev_	err(dev, "USB%d: Channel %d interrupt without halt\n",
 			usb->index, channel);
-		return -1;
+		return -EINVAL;
 	}
 
 	return 0;
-- 
2.16.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ