diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-03-10 04:00:05 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-04-12 15:57:22 -0400 |
commit | 99b80e97710ae2e53c951acfdd956e9f38e36646 (patch) | |
tree | df0c3a4692d6d9740c1da3dcb08fc30987737332 /drivers/ata | |
parent | 96d5d96aedc29c75bb16433f6ecf8664ec3c1b46 (diff) |
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/sata_mv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 38950ea8398a..7336d4a7ab31 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -4025,7 +4025,8 @@ static int mv_platform_probe(struct platform_device *pdev) | |||
4025 | struct ata_host *host; | 4025 | struct ata_host *host; |
4026 | struct mv_host_priv *hpriv; | 4026 | struct mv_host_priv *hpriv; |
4027 | struct resource *res; | 4027 | struct resource *res; |
4028 | int n_ports, rc; | 4028 | int n_ports = 0; |
4029 | int rc; | ||
4029 | 4030 | ||
4030 | ata_print_version_once(&pdev->dev, DRV_VERSION); | 4031 | ata_print_version_once(&pdev->dev, DRV_VERSION); |
4031 | 4032 | ||