[PATCH] scsi: sg: Fix a warning message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The WARN_ONCE() macro takes a condition and a warning message as
parameters.  This code accidentally left out the condition so it
doesn't print a warning (just a stack trace).

Fixes: ddfb8cbdf699 ("scsi: sg: Rework scatter-gather handling")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
 drivers/scsi/sg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 79f05afa4407..e261260c1b8b 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2525,7 +2525,7 @@ sg_rq_end_io_usercontext(struct work_struct *work)
 	struct sg_fd *sfp;
 
 	if (!srp) {
-		WARN_ONCE("%s: srp unexpectedly NULL\n", __func__);
+		WARN_ONCE(1, "%s: srp unexpectedly NULL\n", __func__);
 		return;
 	}
 	sfp = srp->parentfp;
-- 
2.30.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux