SCSI-sd: Delete an error message for a failed memory allocation in sd_revalidate_disk()
Subsystems (2)
PATCH 1/1 SCSI-sd: Delete an error message for a failed memory allocation in sd_revalidate_disk()
From: Markus Elfring <[email protected]>
Date: Fri, 25 Aug 2017 21:34:44 +0200
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 <[email protected]>
--- drivers/scsi/sd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/scsi/sd.c +1 -4
@@ -3067,11 +3067,8 @@ static int sd_revalidate_disk(struct gendisk *disk) goto out; buffer =kmalloc (SD_BUF_SIZE ,GFP_KERNEL ); -if (!buffer) { -sd_printk (KERN_WARNING , sdkp,"sd_revalidate_disk: Memory " -"allocation failure.\n" ); +if (!buffer) goto out; - }sd_spinup_disk (sdkp);
Signature · 1 line
2.14.0