aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/firmware_class.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 171841ad1008..49139a1ee25e 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -322,7 +322,11 @@ static int fw_get_filesystem_firmware(struct device *device,
322{ 322{
323 int i; 323 int i;
324 int rc = -ENOENT; 324 int rc = -ENOENT;
325 char *path = __getname(); 325 char *path;
326
327 path = __getname();
328 if (!path)
329 return -ENOMEM;
326 330
327 for (i = 0; i < ARRAY_SIZE(fw_path); i++) { 331 for (i = 0; i < ARRAY_SIZE(fw_path); i++) {
328 struct file *file; 332 struct file *file;