firmware: arm_scmi: Remove extra check for invalid length message responses
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 8 Jul 2019 08:40:35 +0000 (09:40 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 12 Aug 2019 11:22:58 +0000 (12:22 +0100)
commit37bbffcb19a7c98ed0a8c0b2dd2e11bfc05d5964
treeb0751b2a4f18b5ef674427b020b7a4fa1706b80d
parent9eefa43a1a03960c7458e1463132f893702741be
firmware: arm_scmi: Remove extra check for invalid length message responses

scmi_xfer_get_init ensures both transmit and receive buffer lengths are
within the maximum limits. If receive buffer length is not supplied by
the caller, it's set to the maximum limit value. Receive buffer length
is never modified after that. So there's no need for the extra check
when receive transmit completion for a command essage.

Further, if the response header length is greater than the prescribed
receive buffer length, the response buffer is truncated to the latter.

Reported-by: Jim Quinlan <james.quinlan@broadcom.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/driver.c