소스 검색

V4L/DVB (5822): Fix the return value in ttpci_budget_init()

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>
Hartmut Birr 18 년 전
부모
커밋
1fb4a17f6e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/media/dvb/ttpci/budget-core.c

+ 1 - 1
drivers/media/dvb/ttpci/budget-core.c

@@ -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 */