Skip to content

Commit

Permalink
ata: ahci_xgene: potential NULL dereference in probe
Browse files Browse the repository at this point in the history
Smatch complains about this potential NULL dereference of "acpi_id".

Fixes: c9802a4 ('ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller.')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
Dan Carpenter authored and htejun committed May 18, 2015
1 parent c9802a4 commit 2d32d10
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/ata/ahci_xgene.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
if (!acpi_id) {
dev_warn(&pdev->dev, "No node entry in ACPI table. Assume version1\n");
version = XGENE_AHCI_V1;
}

if (acpi_id->driver_data) {
} else if (acpi_id->driver_data) {
version = (enum xgene_ahci_version) acpi_id->driver_data;
status = acpi_get_object_info(ACPI_HANDLE(&pdev->dev), &info);
if (ACPI_FAILURE(status)) {
Expand Down

0 comments on commit 2d32d10

Please sign in to comment.