From: Henrik Kurelid <henrik@kurelid.se>
Date: Mon, 15 Dec 2008 07:17:12 +0000 (+0100)
Subject: firedtv: fix registration - adapter number could only be zero
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a40bf5591681f707afcf550cdcb4cc1697a29504;p=openwrt%2Fstaging%2Fblogic.git

firedtv: fix registration - adapter number could only be zero

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>
---

diff --git a/drivers/media/dvb/firesat/firesat_dvb.c b/drivers/media/dvb/firesat/firesat_dvb.c
index cfa3a2e8edd1..cb36c0310199 100644
--- a/drivers/media/dvb/firesat/firesat_dvb.c
+++ b/drivers/media/dvb/firesat/firesat_dvb.c
@@ -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*/