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: Devesh Jhunjhunwala <deveshj@codeaurora.org>
This commit is contained in:
parent
d765f15445
commit
590c1ceef7
|
@ -362,6 +362,8 @@ static bool fw_get_filesystem_firmware(struct device *device,
|
|||
int i;
|
||||
bool success = false;
|
||||
char *path = __getname();
|
||||
if (!path)
|
||||
return false;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(fw_path); i++) {
|
||||
struct file *file;
|
||||
|
|
Loading…
Reference in New Issue