V4L/DVB (5822): Fix the return value in ttpci_budget_init()
authorHartmut Birr <e9hack@googlemail.com>
Mon, 2 Jul 2007 16:39:41 +0000 (13:39 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 3 Jul 2007 18:11:21 +0000 (15:11 -0300)
if the call to budget_register() fails in ttpci_budget_int(),
ttpci_budget_init() returns success. The attached patch will
fix this problem.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/ttpci/budget-core.c

index 2557ac9620d02f20794955c6a0f26c87d8df7d19..b611f2b1f8bc48602be277a84e61edb8cb31fd6c 100644 (file)
@@ -529,7 +529,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
        if (bi->type != BUDGET_FS_ACTIVY)
                saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI);
 
-       if (budget_register(budget) == 0)
+       if ((ret = budget_register(budget)) == 0)
                return 0; /* Everything OK */
 
        /* An error occurred, cleanup resources */