Skip to content

Commit

Permalink
sata_dwc_460ex: remove extra message
Browse files Browse the repository at this point in the history
There is no need to print a message about failure of memory allocation. The
caller will get an error code and may print the same.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Andy Shevchenko authored and Tejun Heo committed Jan 8, 2015
1 parent 9037908 commit c592b74
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/ata/sata_dwc_460ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1677,11 +1677,8 @@ static int sata_dwc_probe(struct platform_device *ofdev)

/* Allocate DWC SATA device */
hsdev = kzalloc(sizeof(*hsdev), GFP_KERNEL);
if (hsdev == NULL) {
dev_err(&ofdev->dev, "kmalloc failed for hsdev\n");
err = -ENOMEM;
goto error;
}
if (hsdev == NULL)
return -ENOMEM;

if (of_property_read_u32(np, "dma-channel", &dma_chan)) {
dev_warn(&ofdev->dev, "no dma-channel property set."
Expand Down Expand Up @@ -1783,7 +1780,6 @@ static int sata_dwc_probe(struct platform_device *ofdev)
iounmap(base);
error_kmalloc:
kfree(hsdev);
error:
return err;
}

Expand Down

0 comments on commit c592b74

Please sign in to comment.