xpp: Fail loading if no module on first slot
The driver assumes that the first slot is not empty. If this is not the case, synchronization will not work. Fail loading if this assertion does not hold. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
parent
f287c0af7f
commit
bd0366287e
|
@ -511,6 +511,11 @@ HANDLER_DEF(GLOBAL, AB_DESCRIPTION)
|
|||
ret = -EPROTO;
|
||||
goto proto_err;
|
||||
}
|
||||
if (units[0].addr.unit != 0 || units[0].addr.subunit != 0) {
|
||||
XBUS_NOTICE(xbus, "No first module. Astribank unusable.\n");
|
||||
ret = -EPROTO;
|
||||
goto proto_err;
|
||||
}
|
||||
if (!xbus_setstate(xbus, XBUS_STATE_RECVD_DESC)) {
|
||||
ret = -EPROTO;
|
||||
goto proto_err;
|
||||
|
|
Loading…
Reference in New Issue