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

Configure Feed

Select the types of activity you want to include in your feed.

scsi: sd: Remove redundant printk() after kmalloc() failure

The SCSI disk driver prints a warning when kmalloc() fails in
sd_revalidate_disk(). This is redundant because the page allocator
already reports failures unless __GFP_NOWARN is used. Keeping the extra
message only adds noise to the kernel log.

Remove the unnecessary sd_printk() call. Control flow is unchanged.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Abinash Singh <abinashsinghlalotra@gmail.com>
Link: https://lore.kernel.org/r/20250825183940.13211-3-abinashsinghlalotra@gmail.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Abinash Singh and committed by
Martin K. Petersen
d842da69 b5f717b3

+1 -4
+1 -4
drivers/scsi/sd.c
··· 3716 3716 goto out; 3717 3717 3718 3718 buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL); 3719 - if (!buffer) { 3720 - sd_printk(KERN_WARNING, sdkp, "sd_revalidate_disk: Memory " 3721 - "allocation failure.\n"); 3719 + if (!buffer) 3722 3720 goto out; 3723 - } 3724 3721 3725 3722 sd_spinup_disk(sdkp); 3726 3723