Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1246392 > unrolled thread
| Started by | Heloise NH <os@iscas.ac.cn> |
|---|---|
| First post | 2015-10-14 10:20 +0200 |
| Last post | 2015-10-14 14:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] fix return value error Heloise NH <os@iscas.ac.cn> - 2015-10-14 10:20 +0200
Re: [PATCH] fix return value error Leon Romanovsky <leon@leon.nu> - 2015-10-14 14:10 +0200
| From | Heloise NH <os@iscas.ac.cn> |
|---|---|
| Date | 2015-10-14 10:20 +0200 |
| Subject | [PATCH] fix return value error |
| Message-ID | <qjprX-15w-3@gated-at.bofh.it> |
Signed-off-by: Heloise NH <os@iscas.ac.cn>
---
drivers/infiniband/hw/ipath/ipath_fs.c | 2 +-
drivers/infiniband/hw/qib/qib_fs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
index 25422a3..da753bc 100644
--- a/drivers/infiniband/hw/ipath/ipath_fs.c
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c
@@ -53,7 +53,7 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
struct inode *inode = new_inode(dir->i_sb);
if (!inode) {
- error = -EPERM;
+ error = -ENOMEM;
goto bail;
}
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index 13ef22b..a4c5a6a 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -55,7 +55,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
struct inode *inode = new_inode(dir->i_sb);
if (!inode) {
- error = -EPERM;
+ error = -ENOMEM;
goto bail;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Leon Romanovsky <leon@leon.nu> |
|---|---|
| Date | 2015-10-14 14:10 +0200 |
| Message-ID | <qjt2x-6rP-1@gated-at.bofh.it> |
| In reply to | #1246392 |
On Wed, Oct 14, 2015 at 11:17 AM, Heloise NH <os@iscas.ac.cn> wrote:
> Signed-off-by: Heloise NH <os@iscas.ac.cn>
The patch is a correct one, however can you update the subject and
description to be more informative?
Please add that new_inode() function can fail for allocation only.
> ---
> drivers/infiniband/hw/ipath/ipath_fs.c | 2 +-
> drivers/infiniband/hw/qib/qib_fs.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
> index 25422a3..da753bc 100644
> --- a/drivers/infiniband/hw/ipath/ipath_fs.c
> +++ b/drivers/infiniband/hw/ipath/ipath_fs.c
> @@ -53,7 +53,7 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
> struct inode *inode = new_inode(dir->i_sb);
>
> if (!inode) {
> - error = -EPERM;
> + error = -ENOMEM;
> goto bail;
> }
>
> diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
> index 13ef22b..a4c5a6a 100644
> --- a/drivers/infiniband/hw/qib/qib_fs.c
> +++ b/drivers/infiniband/hw/qib/qib_fs.c
> @@ -55,7 +55,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
> struct inode *inode = new_inode(dir->i_sb);
>
> if (!inode) {
> - error = -EPERM;
> + error = -ENOMEM;
> goto bail;
> }
>
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web