]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/base/firmware_class.c
firmware: make sure the fw file size is not 0
[karo-tx-linux.git] / drivers / base / firmware_class.c
index d81460309182fde4177865a922f740c278c7d40c..b392b353be39016818abd096da01fb4a18839450 100644 (file)
@@ -305,7 +305,7 @@ static bool fw_read_file_contents(struct file *file, struct firmware_buf *fw_buf
        char *buf;
 
        size = fw_file_size(file);
-       if (size < 0)
+       if (size <= 0)
                return false;
        buf = vmalloc(size);
        if (!buf)