瀏覽代碼

ARM: qcom: silence an uninitialized variable warning

It's harmless but, if "enable" isn't set, then we pass uninitialized
values to qcom_coincell_chgr_config().  The values aren't used, but
let's silence the warning anyway.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tim Bird <tim.bird@sonymobile.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter 9 年之前
父節點
當前提交
66b58edf59
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/misc/qcom-coincell.c

+ 2 - 1
drivers/misc/qcom-coincell.c

@@ -94,7 +94,8 @@ static int qcom_coincell_probe(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct qcom_coincell chgr;
-	u32 rset, vset;
+	u32 rset = 0;
+	u32 vset = 0;
 	bool enable;
 	int rc;