public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drivers: host: fix parameter check in nvme_fault_inject_init()
@ 2023-07-12 11:18 Minjie Du
  2023-07-12 13:01 ` Christoph Hellwig
  2023-07-12 16:27 ` Keith Busch
  0 siblings, 2 replies; 3+ messages in thread
From: Minjie Du @ 2023-07-12 11:18 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	open list:NVM EXPRESS DRIVER, open list
  Cc: opensource.kernel, Minjie Du

Make IS_ERR() judge the debugfs_create_dir() function return.

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 drivers/nvme/host/fault_inject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/fault_inject.c b/drivers/nvme/host/fault_inject.c
index 83d2e6860..1ba10a5c6 100644
--- a/drivers/nvme/host/fault_inject.c
+++ b/drivers/nvme/host/fault_inject.c
@@ -27,7 +27,7 @@ void nvme_fault_inject_init(struct nvme_fault_inject *fault_inj,
 
 	/* create debugfs directory and attribute */
 	parent = debugfs_create_dir(dev_name, NULL);
-	if (!parent) {
+	if (IS_ERR(parent)) {
 		pr_warn("%s: failed to create debugfs directory\n", dev_name);
 		return;
 	}
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] drivers: host: fix parameter check in nvme_fault_inject_init()
  2023-07-12 11:18 [PATCH v1] drivers: host: fix parameter check in nvme_fault_inject_init() Minjie Du
@ 2023-07-12 13:01 ` Christoph Hellwig
  2023-07-12 16:27 ` Keith Busch
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2023-07-12 13:01 UTC (permalink / raw)
  To: Minjie Du
  Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	open list:NVM EXPRESS DRIVER, open list, opensource.kernel

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] drivers: host: fix parameter check in nvme_fault_inject_init()
  2023-07-12 11:18 [PATCH v1] drivers: host: fix parameter check in nvme_fault_inject_init() Minjie Du
  2023-07-12 13:01 ` Christoph Hellwig
@ 2023-07-12 16:27 ` Keith Busch
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2023-07-12 16:27 UTC (permalink / raw)
  To: Minjie Du
  Cc: Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	open list:NVM EXPRESS DRIVER, open list, opensource.kernel

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-12 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 11:18 [PATCH v1] drivers: host: fix parameter check in nvme_fault_inject_init() Minjie Du
2023-07-12 13:01 ` Christoph Hellwig
2023-07-12 16:27 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox