remoteproc/mediatek: skip if filesz is 0
authorTzung-Bi Shih <tzungbi@google.com>
Mon, 16 Nov 2020 08:44:12 +0000 (16:44 +0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sat, 21 Nov 2020 03:45:42 +0000 (21:45 -0600)
commit48cb5b6829e2acb4b600153142889f879115e172
tree469749b0b48f548f2dffa6c5b361be656e425d6d
parent71ffb5a22b49ad1c6266aad237cf8f1f5b13fe9a
remoteproc/mediatek: skip if filesz is 0

The main purpose of the loop is to load the memory to the SCP SRAM.
If filesz is 0, can go to next program header directly.

We don't need to try to validate the FW binary for those filesz==0
segments.

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20201116084413.3312631-3-tzungbi@google.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/mtk_scp.c