diff mbox

IB/hfi1: Add missing error code assignment before test

Message ID 1470807267-12714-1-git-send-email-christophe.jaillet@wanadoo.fr (mailing list archive)
State Accepted
Headers show

Commit Message

Christophe JAILLET Aug. 10, 2016, 5:34 a.m. UTC
It is likely that checking the result of 'setup_ctxt' is expected here.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dennis Dalessandro Aug. 10, 2016, 4:10 p.m. UTC | #1
On Wed, 2016-08-10 at 07:34 +0200, Christophe JAILLET wrote:
> It is likely that checking the result of 'setup_ctxt' is expected

> here.

> 

> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

> ---

>  drivers/infiniband/hw/hfi1/file_ops.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/infiniband/hw/hfi1/file_ops.c

> b/drivers/infiniband/hw/hfi1/file_ops.c

> index 1ecbec192358..ed76be39b20b 100644

> --- a/drivers/infiniband/hw/hfi1/file_ops.c

> +++ b/drivers/infiniband/hw/hfi1/file_ops.c

> @@ -222,7 +222,7 @@ static long hfi1_file_ioctl(struct file *fp,

> unsigned int cmd,

>  		ret = assign_ctxt(fp, &uinfo);

>  		if (ret < 0)

>  			return ret;

> -		setup_ctxt(fp);

> +		ret = setup_ctxt(fp);

>  		if (ret)

>  			return ret;

>  		ret = user_init(fp);


Thanks for the patch.

Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Doug Ledford Aug. 22, 2016, 6:23 p.m. UTC | #2
On 8/10/2016 12:10 PM, Dalessandro, Dennis wrote:
> On Wed, 2016-08-10 at 07:34 +0200, Christophe JAILLET wrote:
>> It is likely that checking the result of 'setup_ctxt' is expected
>> here.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---

> 
> Thanks for the patch.
> 
> Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
> 

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c
index 1ecbec192358..ed76be39b20b 100644
--- a/drivers/infiniband/hw/hfi1/file_ops.c
+++ b/drivers/infiniband/hw/hfi1/file_ops.c
@@ -222,7 +222,7 @@  static long hfi1_file_ioctl(struct file *fp, unsigned int cmd,
 		ret = assign_ctxt(fp, &uinfo);
 		if (ret < 0)
 			return ret;
-		setup_ctxt(fp);
+		ret = setup_ctxt(fp);
 		if (ret)
 			return ret;
 		ret = user_init(fp);