remoteproc: Check for NULL firmwares in sysfs interface
authorSuman Anna <s-anna@ti.com>
Sat, 15 Sep 2018 00:37:22 +0000 (19:37 -0500)
committerSuman Anna <s-anna@ti.com>
Wed, 19 Dec 2018 03:15:02 +0000 (21:15 -0600)
commitf47a8bd68a8fd2074ea3b1c6f7d6aa7c5ca303bb
tree218f5c209c87a9e917f7362745796056401dc3ae
parent3578d874f3e84e89bb84f1e6f7d7d41279651b40
remoteproc: Check for NULL firmwares in sysfs interface

[ Upstream commit faeadbb64094757150a8c2a3175ca418dbdd472c ]

The remoteproc framework provides a sysfs file 'firmware'
for modifying the firmware image name from userspace. Add
an additional check to ensure NULL firmwares are errored
out right away, rather than getting a delayed error while
requesting a firmware during the start of a remoteproc
later on.

Tested-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
[s-anna@ti.com: cherry-pick commit 'faeadbb64094' from v4.20]
drivers/remoteproc/remoteproc_sysfs.c