From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Rupjyoti Sarmah <rsarmah@amcc.com>, Tejun Heo <tj@kernel.org>,
linux-ide@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/3] sata_dwc_460ex: remove extra message
Date: Thu, 8 Jan 2015 12:50:13 +0200 [thread overview]
Message-ID: <1420714214-16950-2-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1420714214-16950-1-git-send-email-andriy.shevchenko@linux.intel.com>
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>
---
drivers/ata/sata_dwc_460ex.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index b206017..169cbca 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;
}
--
2.1.3
next prev parent reply other threads:[~2015-01-08 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 10:50 [PATCH v1 1/3] sata_dwc_460ex: use np local variable in ->probe() Andy Shevchenko
2015-01-08 10:50 ` Andy Shevchenko [this message]
2015-01-08 10:50 ` [PATCH v1 3/3] sata_dwc_460ex: convert to devm_kzalloc " Andy Shevchenko
2015-01-08 13:31 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420714214-16950-2-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-ide@vger.kernel.org \
--cc=rsarmah@amcc.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).