提交 2d85ec8a 编写于 作者: W Wei Yongjun 提交者: David S. Miller

oradax: Fix return value check in dax_attach()

In case of error, the function class_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Fixes: dd027328 ("sparc64: Oracle DAX driver")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b3ca676f
......@@ -336,9 +336,9 @@ static int __init dax_attach(void)
}
cl = class_create(THIS_MODULE, DAX_NAME);
if (cl == NULL) {
if (IS_ERR(cl)) {
dax_err("class_create failed");
ret = -ENXIO;
ret = PTR_ERR(cl);
goto class_error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册