OSDN Git Service

mailbox: Fix up error handling in mbox_request_channel()
authorBenson Leung <bleung@chromium.org>
Mon, 4 May 2015 17:36:36 +0000 (10:36 -0700)
committerJassi Brar <jaswinder.singh@linaro.org>
Tue, 12 May 2015 03:48:21 +0000 (09:18 +0530)
commit2d805fc1c6b2ec09f27bcd951c2aee3da919f81a
tree295523b6586a470b8b01e91929b531cf3c0e0af4
parent05ae797566a66d159cf1e2ee11bf3f6fae40c8eb
mailbox: Fix up error handling in mbox_request_channel()

mbox_request_channel() currently returns EBUSY in the event the controller
is not present or if of_xlate() fails, but in neither case is EBUSY really
appropriate.  Return EPROBE_DEFER if the controller is not yet present
and change of_xlate() to return an ERR_PTR instead of NULL so that the
error can be propagated back to the caller of mbox_request_channel().

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Acked-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mailbox.c
drivers/mailbox/omap-mailbox.c