firedtv: fix registration - adapter number could only be zero
authorHenrik Kurelid <henrik@kurelid.se>
Mon, 15 Dec 2008 07:17:12 +0000 (08:17 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 24 Feb 2009 13:51:28 +0000 (14:51 +0100)
There was a bug causing the initialization to fail if adapter number was
greater than zero. The adapter was however registered which caused the driver
to oops the second time initialization was tried.

Signed-off-by: Henrik Kurelid <henrik@kurelid.se>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/media/dvb/firesat/firesat_dvb.c

index cfa3a2e..cb36c03 100644 (file)
@@ -206,7 +206,7 @@ int firesat_dvbdev_init(struct firesat *firesat, struct device *dev)
        err = DVB_REGISTER_ADAPTER(&firesat->adapter,
                                   firedtv_model_names[firesat->type],
                                   THIS_MODULE, dev, adapter_nr);
-       if (err)
+       if (err < 0)
                goto fail_log;
 
        /*DMX_TS_FILTERING | DMX_SECTION_FILTERING*/