Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d19574fc authored by Devesh Jhunjhunwala's avatar Devesh Jhunjhunwala
Browse files

firmware_class: Add null check in fw_get_filesystem_firmware



Add null check for the return value of kmem_cache_alloc before
using it.

CRs-Fixed: 836643
Change-Id: If0d8055b84fb9f9c372a68acc2a53f39035fffef
Signed-off-by: default avatarDevesh Jhunjhunwala <deveshj@codeaurora.org>
parent cbe50b5f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -364,6 +364,8 @@ static int fw_get_filesystem_firmware(struct device *device,
	int i;
	int rc = -ENOENT;
	char *path = __getname();
	if (!path)
		return false;

	for (i = 0; i < ARRAY_SIZE(fw_path); i++) {
		struct file *file;