diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-02-16 08:04:49 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2018-02-18 08:26:07 -0500 |
commit | ef59a62afdd223dadf74a22e994ab79d6bf4f2df (patch) | |
tree | 07bc54aeadbcbb0910a1782b1f36552da828a1a6 | |
parent | 3e342770a22b84c0246719d22c318c22ae2f782a (diff) |
pata_it821x: Delete an error message for a failed memory allocation in it821x_firmware_command()
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | drivers/ata/pata_it821x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 8468b300193b..9bac79edbc2c 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c | |||
@@ -658,10 +658,10 @@ static u8 *it821x_firmware_command(struct ata_port *ap, u8 cmd, int len) | |||
658 | u8 status; | 658 | u8 status; |
659 | int n = 0; | 659 | int n = 0; |
660 | u16 *buf = kmalloc(len, GFP_KERNEL); | 660 | u16 *buf = kmalloc(len, GFP_KERNEL); |
661 | if (buf == NULL) { | 661 | |
662 | printk(KERN_ERR "it821x_firmware_command: Out of memory\n"); | 662 | if (!buf) |
663 | return NULL; | 663 | return NULL; |
664 | } | 664 | |
665 | /* This isn't quite a normal ATA command as we are talking to the | 665 | /* This isn't quite a normal ATA command as we are talking to the |
666 | firmware not the drives */ | 666 | firmware not the drives */ |
667 | ap->ctl |= ATA_NIEN; | 667 | ap->ctl |= ATA_NIEN; |