[media] smscoreapi: Make Siano firmware load more verbose
If firmware load fails, report it as an error. Signed-off-by: Roberto Alcantara <roberto@eletronica.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
a242f42610
commit
4c8d558a14
1 changed files with 3 additions and 3 deletions
|
@ -1154,7 +1154,7 @@ static int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
|
||||||
|
|
||||||
char *fw_filename = smscore_get_fw_filename(coredev, mode);
|
char *fw_filename = smscore_get_fw_filename(coredev, mode);
|
||||||
if (!fw_filename) {
|
if (!fw_filename) {
|
||||||
sms_info("mode %d not supported on this device", mode);
|
sms_err("mode %d not supported on this device", mode);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
sms_debug("Firmware name: %s", fw_filename);
|
sms_debug("Firmware name: %s", fw_filename);
|
||||||
|
@ -1165,14 +1165,14 @@ static int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
|
||||||
|
|
||||||
rc = request_firmware(&fw, fw_filename, coredev->device);
|
rc = request_firmware(&fw, fw_filename, coredev->device);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
sms_info("failed to open \"%s\"", fw_filename);
|
sms_err("failed to open firmware file \"%s\"", fw_filename);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
sms_info("read fw %s, buffer size=0x%zx", fw_filename, fw->size);
|
sms_info("read fw %s, buffer size=0x%zx", fw_filename, fw->size);
|
||||||
fw_buf = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT),
|
fw_buf = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT),
|
||||||
GFP_KERNEL | GFP_DMA);
|
GFP_KERNEL | GFP_DMA);
|
||||||
if (!fw_buf) {
|
if (!fw_buf) {
|
||||||
sms_info("failed to allocate firmware buffer");
|
sms_err("failed to allocate firmware buffer");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
memcpy(fw_buf, fw->data, fw->size);
|
memcpy(fw_buf, fw->data, fw->size);
|
||||||
|
|
Loading…
Add table
Reference in a new issue