projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8762353
)
scsi: cxlflash: Adapter context init can return error
author
Uma Krishnan
<
[email protected]
>
Wed, 3 Jan 2018 22:55:04 +0000
(16:55 -0600)
committer
Martin K. Petersen
<
[email protected]
>
Thu, 11 Jan 2018 04:24:57 +0000
(23:24 -0500)
Adapter context creation can return either NULL or an error pointer.
Updating the check condition to reflect this.
Signed-off-by: Uma Krishnan <
[email protected]
>
Acked-by: Matthew R. Ochs <
[email protected]
>
Signed-off-by: Martin K. Petersen <
[email protected]
>
drivers/scsi/cxlflash/main.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/cxlflash/main.c
b/drivers/scsi/cxlflash/main.c
index b6cadebbfa94d4e5d7412f91e84cf8745527b1df..32014e88cdb12598ed8aadd7c194823f0dd9651d 100644
(file)
--- a/
drivers/scsi/cxlflash/main.c
+++ b/
drivers/scsi/cxlflash/main.c
@@
-1992,7
+1992,7
@@
static int init_mc(struct cxlflash_cfg *cfg, u32 index)
ctx = cxl_get_context(cfg->dev);
else
ctx = cxl_dev_context_init(cfg->dev);
- if (
unlikely(!
ctx)) {
+ if (
IS_ERR_OR_NULL(
ctx)) {
rc = -ENOMEM;
goto err1;
}