Skip to content
Commit 27d70693 authored by Patrick van Gelder's avatar Patrick van Gelder Committed by Michal Simek
Browse files

ARM: zynq: Fix invalid check on NAND_CMD_NONE.



The end_cmd field in the variables cmd_phase_addr and data_phase_addr
contains the value 0xFF when the end_cmd equals NAND_CMD_NONE. This
should be 0x00.

This is caused by comparing NAND_CMD_NONE (int) with end_cmd (u8).
end_cmd will be promoted by the int value -1 and therefore is not equal
to 0xFF. Solved by casting NAND_CMD_NONE to u8 which will avoid int
promotion.

Signed-off-by: default avatarPatrick van Gelder <patrick.vangelder@nl.bosch.com>
Reviewed-by: default avatarT Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 19d13045
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment