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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:23:15 +0000 (08:23 +0100)
commitd26bd1ce5d3925d1cf9abb2f41f928b29cb77819
tree0a8e066abbaffa3193dfebeceb6aa9535f45a479
parent5611a2b8a713b52d7c4eeddf1844d22d1f863720
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/remoteproc/remoteproc_sysfs.c