summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-01-08 11:50:13 +0100
committerTejun Heo <tj@kernel.org>2015-01-08 14:30:48 +0100
commitc592b74f6b8ba72cb0b5a90ceb0989fc35fc1391 (patch)
treee37fc009e881edcffe4f671d17046d99837bb00b /drivers/ata
parentsata_dwc_460ex: use np local variable in ->probe() (diff)
downloadlinux-c592b74f6b8ba72cb0b5a90ceb0989fc35fc1391.tar.xz
linux-c592b74f6b8ba72cb0b5a90ceb0989fc35fc1391.zip
sata_dwc_460ex: remove extra message
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>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_dwc_460ex.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index b2060177a083..169cbca489f3 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -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."
@@ -1783,7 +1780,6 @@ error_iomap:
iounmap(base);
error_kmalloc:
kfree(hsdev);
-error:
return err;
}