Re: [PATCH] librdmacm: Return errno on create_qp failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 26, 2018 at 10:06:37PM +0000, Hefty, Sean wrote:
> > Drivers are supposed to return errno, I'm sure lots and lots of them
> > have paths where they fail to do this.
> 
> The code could check for errno, and assume if set that it's set to the correct error number.
> 
> if (!qp) {
> 	ret = errno ? ERR(errno) : ENOMEM;
> 
> or wrap the errno check/return in a macro 

And zero errno befor calling the driver.

We'd have to put that sort of guard in all the verbs calls that return
a pointer, I think.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux