* [PATCH] scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init()
@ 2022-05-06 13:17 Dan Carpenter
2022-05-17 1:31 ` Martin K. Petersen
2022-05-20 1:09 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-05-06 13:17 UTC (permalink / raw)
To: Sathya Prakash Veerichetty, Sumit Saxena
Cc: Kashyap Desai, Sreekanth Reddy, James E.J. Bottomley,
Martin K. Petersen, Hannes Reinecke, Himanshu Madhani,
mpi3mr-linuxdrv.pdl, linux-scsi, kernel-janitors
The bsg_setup_queue() function does not return NULL. It returns
error pointers. Fix the check accordingly.
Fixes: 4268fa751365 ("scsi: mpi3mr: Add bsg device support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/scsi/mpi3mr/mpi3mr_app.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index 73bb7992d5a8..8138a728d1ab 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -1540,7 +1540,7 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc)
mrioc->bsg_queue = bsg_setup_queue(mrioc->bsg_dev, dev_name(mrioc->bsg_dev),
mpi3mr_bsg_request, NULL, 0);
- if (!mrioc->bsg_queue) {
+ if (IS_ERR(mrioc->bsg_queue)) {
ioc_err(mrioc, "%s: bsg registration failed\n",
dev_name(mrioc->bsg_dev));
goto err_setup_queue;
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init()
2022-05-06 13:17 [PATCH] scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init() Dan Carpenter
@ 2022-05-17 1:31 ` Martin K. Petersen
2022-05-20 1:09 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-05-17 1:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sathya Prakash Veerichetty, Sumit Saxena, Kashyap Desai,
Sreekanth Reddy, James E.J. Bottomley, Martin K. Petersen,
Hannes Reinecke, Himanshu Madhani, mpi3mr-linuxdrv.pdl,
linux-scsi, kernel-janitors
Dan,
> The bsg_setup_queue() function does not return NULL. It returns error
> pointers. Fix the check accordingly.
Applied to 5.19/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init()
2022-05-06 13:17 [PATCH] scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init() Dan Carpenter
2022-05-17 1:31 ` Martin K. Petersen
@ 2022-05-20 1:09 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-05-20 1:09 UTC (permalink / raw)
To: Sathya Prakash Veerichetty, Dan Carpenter, Sumit Saxena
Cc: Martin K . Petersen, linux-scsi, Kashyap Desai,
James E.J. Bottomley, kernel-janitors, mpi3mr-linuxdrv.pdl,
Hannes Reinecke, Sreekanth Reddy, Himanshu Madhani
On Fri, 6 May 2022 16:17:33 +0300, Dan Carpenter wrote:
> The bsg_setup_queue() function does not return NULL. It returns
> error pointers. Fix the check accordingly.
>
>
Applied to 5.19/scsi-queue, thanks!
[1/1] scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init()
https://git.kernel.org/mkp/scsi/c/a25eafd13e5f
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-20 1:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 13:17 [PATCH] scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init() Dan Carpenter
2022-05-17 1:31 ` Martin K. Petersen
2022-05-20 1:09 ` Martin K. Petersen
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.