Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Markus Elfring and committed by
Tejun Heo
ef59a62a 3e342770

+3 -3
+3 -3
drivers/ata/pata_it821x.c
··· 658 658 u8 status; 659 659 int n = 0; 660 660 u16 *buf = kmalloc(len, GFP_KERNEL); 661 - if (buf == NULL) { 662 - printk(KERN_ERR "it821x_firmware_command: Out of memory\n"); 661 + 662 + if (!buf) 663 663 return NULL; 664 - } 664 + 665 665 /* This isn't quite a normal ATA command as we are talking to the 666 666 firmware not the drives */ 667 667 ap->ctl |= ATA_NIEN;