Really shouldn't have any compiler warnings. This includes a check on the rfkill_register which is marked as must check. Please use this patch instead for clean compilation.

Sean McNeil wrote:
It turns out the code I used for reference was setting an invalid initial value for the state. Setting it to the off state should prevent the warning trace seen by Werner. I didn't see it as my dmesg buffer is flooded with other messages, so I can't verify it is gone either.

Sean


diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_bt.c b/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
index 98ff77a..708bdc5 100644
--- a/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
+++ b/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
@@ -184,10 +184,13 @@ static int __init gta01_bt_probe(struct platform_device *pdev)
 
 	rfkill->name = pdev->name;
 	rfkill->data = pdev;
-	rfkill->state = -1;
+	rfkill->state = RFKILL_STATE_OFF;
 	rfkill->toggle_radio = bt_rfkill_toggle_radio;
 
-	rfkill_register(rfkill);
+	if (rfkill_register(rfkill) < 0) {
+		/* We can live if it fails to register, but report it. */
+		dev_dbg(&pdev->dev, DRVMSG ": RFKILL registration failed\n");
+	}
 
 	platform_set_drvdata(pdev, rfkill);
 

Reply via email to