[PATCH] firedtv: adapter number could only be zero

Henrik Kurelid henke at kurelid.se
Mon Dec 15 07:17:12 UTC 2008

From: Henrik Kurelid <henrik at kurelid.se>

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 at kurelid.se>
 drivers/media/dvb/firesat/firesat_dvb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/firesat/firesat_dvb.c b/drivers/media/dvb/firesat/firesat_dvb.c
index cfa3a2e..cb36c03 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,
 				   THIS_MODULE, dev, adapter_nr);
-	if (err)
+	if (err < 0)
 		goto fail_log;

More information about the devel mailing list