]> git.baikalelectronics.ru Git - kernel.git/commit
can: xilinx_can: fix comparison of unsigned variable
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 18 Nov 2014 13:47:07 +0000 (19:17 +0530)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 18 Nov 2014 16:47:49 +0000 (17:47 +0100)
commit3da5920ab9837a550b453d6a80e61f8c6024852c
tree5abdbadb2ba03aeb6373c978d50874d4b853d1f2
parent99a2c873cacf6b96467e6354ba971a4d39610a8a
can: xilinx_can: fix comparison of unsigned variable

The variable err was of the type u32. It was being compared with < 0, and being
an unsigned variable the comparison would have been always false.

Moreover, err was getting the return value from set_reset_mode() and
xcan_set_bittiming(), and both are returning int.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/xilinx_can.c