mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
xen/9pfs: fix return value check in xen_9pfs_front_probe()
In case of error, the function xenbus_read() returns ERR_PTR() and never
returns NULL. The NULL test in the return value check should be replaced
with IS_ERR().
Fixes: 71ebd71921 ("xen/9pfs: connect to the backend")
Signed-off-by: Wei Yongjun <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
This commit is contained in:
parent
69861e0a52
commit
14e3995e63
1 changed files with 2 additions and 2 deletions
|
|
@ -454,8 +454,8 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev,
|
|||
goto error_xenbus;
|
||||
}
|
||||
priv->tag = xenbus_read(xbt, dev->nodename, "tag", NULL);
|
||||
if (!priv->tag) {
|
||||
ret = -EINVAL;
|
||||
if (IS_ERR(priv->tag)) {
|
||||
ret = PTR_ERR(priv->tag);
|
||||
goto error_xenbus;
|
||||
}
|
||||
ret = xenbus_transaction_end(xbt, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue