From: "Jiri Slaby" Unregister video device if it is registered, but driver fail still in initialization. Signed-off-by: Andrew Morton --- drivers/media/radio/radio-maestro.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/media/radio/radio-maestro.c~media-radio-pci-probing-for-maestro-radio-fix drivers/media/radio/radio-maestro.c --- devel/drivers/media/radio/radio-maestro.c~media-radio-pci-probing-for-maestro-radio-fix 2006-01-04 02:35:44.000000000 -0800 +++ devel-akpm/drivers/media/radio/radio-maestro.c 2006-01-04 02:35:50.000000000 -0800 @@ -331,7 +331,7 @@ static int __devinit maestro_probe(struc if (!radio_power_on(radio_unit)) { retval = -EIO; - goto errfr1; + goto errunr; } dev_info(&pdev->dev, "version " DRIVER_VERSION " time " __TIME__ " " @@ -339,6 +339,8 @@ static int __devinit maestro_probe(struc dev_info(&pdev->dev, "radio chip initialized\n"); return 0; +errunr: + video_unregister_device(maestro_radio_inst); errfr1: kfree(maestro_radio_inst); errfr: _