Skip to content
Snippets Groups Projects
Commit cae025aa authored by Robert Baldyga's avatar Robert Baldyga Committed by Simon Glass
Browse files

dm: avoid dev->req_seq overflow


Since dev->req_seq value is initialized from "reg" property of fdt node,
there is posibility, that address value contained in fdt is greater than
INT_MAX, and then value in dev->req_seq is negative which led to probe()
fail.

This patch fix this problem by ensuring that req_seq is positive, unless
it's one of errno codes.

Signed-off-by: default avatarRobert Baldyga <r.baldyga@samsung.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 59990bf0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment