aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-blackbird.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-blackbird.c')
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index 349632b48e93..b60177f173c3 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -453,11 +453,13 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
453 if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) { 453 if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) {
454 dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n", 454 dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n",
455 firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE); 455 firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE);
456 release_firmware(firmware);
456 return -1; 457 return -1;
457 } 458 }
458 459
459 if (0 != memcmp(firmware->data, magic, 8)) { 460 if (0 != memcmp(firmware->data, magic, 8)) {
460 dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n"); 461 dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n");
462 release_firmware(firmware);
461 return -1; 463 return -1;
462 } 464 }
463 465
@@ -478,6 +480,7 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
478 } 480 }
479 if (checksum) { 481 if (checksum) {
480 dprintk(0, "ERROR: Firmware load failed (checksum mismatch).\n"); 482 dprintk(0, "ERROR: Firmware load failed (checksum mismatch).\n");
483 release_firmware(firmware);
481 return -1; 484 return -1;
482 } 485 }
483 release_firmware(firmware); 486 release_firmware(firmware);