提交 99b80e97 编写于 作者: D Dan Carpenter 提交者: Jeff Garzik

sata_mv: silence an uninitialized variable warning

Gcc version 4.6.2-12 complains that if we can't find the "nr-ports"
property in of_property_read_u32_array() then "n_ports" is used
uninitialized.  Let's set it to zero in that case.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 96d5d96a
......@@ -4025,7 +4025,8 @@ static int mv_platform_probe(struct platform_device *pdev)
struct ata_host *host;
struct mv_host_priv *hpriv;
struct resource *res;
int n_ports, rc;
int n_ports = 0;
int rc;
ata_print_version_once(&pdev->dev, DRV_VERSION);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册