* [PATCH] SCSI-sd: Delete an error message for a failed memory allocation in sd_revalidate_disk()
@ 2017-08-25 19:37 ` SF Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2017-08-25 19:37 UTC (permalink / raw)
To: linux-scsi, James E. J. Bottomley, Martin K. Petersen
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
drivers/scsi/sd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index bea36adeee17..1f15c31e5a8a 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -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);
--
2.14.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] SCSI-sd: Delete an error message for a failed memory allocation in sd_revalidate_disk()
@ 2017-08-25 19:37 ` SF Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2017-08-25 19:37 UTC (permalink / raw)
To: linux-scsi, James E. J. Bottomley, Martin K. Petersen
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
drivers/scsi/sd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index bea36adeee17..1f15c31e5a8a 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -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);
--
2.14.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-25 19:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 19:37 [PATCH] SCSI-sd: Delete an error message for a failed memory allocation in sd_revalidate_disk() SF Markus Elfring
2017-08-25 19:37 ` SF Markus Elfring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.