Re: [PATCH] isdn: Return -EINTR in gigaset_start() if locking attempts fails.

2012-03-17 Thread David Miller
From: santosh nayak santoshprasadna...@gmail.com Date: Fri, 16 Mar 2012 18:40:13 +0530 We have 3 callers: gigaset_probe(), gigaset_tty_open() and gigaset_probe(). Each caller tries to free allocated memory if lock fails. This is possible if we returns -EINTR. Look again at the callers. They

Re: [PATCH] isdn: Return -EINTR in gigaset_start() if locking attempts fails.

2012-03-17 Thread Tilman Schmidt
Am 16.03.2012 14:10, schrieb santosh nayak: From: Santosh Nayak santoshprasadna...@gmail.com If locking attempt was interrupted by a signal then we should return -EINTR so that caller can take appropriate action. NACK. The return value of gigaset_start(), as documented in its header

Re: [PATCH] isdn: Return -EINTR in gigaset_start() if locking attempts fails.

2012-03-17 Thread santosh prasad nayak
Yes. You are right. Caller is interpreting 0 in opposite way of normal sequence. Thats why I misunderstood it. In general, 0 means success and on error we return -ve. Here its opposite. regards Santosh On Sat, Mar 17, 2012 at 11:48 AM, David Miller da...@davemloft.net wrote: From:

Re: [PATCH] isdn: Return -EINTR in gigaset_start() if locking attempts fails.

2012-03-17 Thread David Miller
From: santosh prasad nayak santoshprasadna...@gmail.com Date: Sat, 17 Mar 2012 21:26:14 +0530 Caller is interpreting 0 in opposite way of normal sequence. Thats why I misunderstood it. The simple fact is that you didn't even look at the code at the call sites when you wrote this patch, and

Re: [PATCH] isdn: Return -EINTR in gigaset_start() if locking attempts fails.

2012-03-17 Thread Julia Lawall
On Sat, 17 Mar 2012, David Miller wrote: From: santosh prasad nayak santoshprasadna...@gmail.com Date: Sat, 17 Mar 2012 21:26:14 +0530 Caller is interpreting 0 in opposite way of normal sequence. Thats why I misunderstood it. The simple fact is that you didn't even look at the code at the

[PATCH] isdn: Return -EINTR in gigaset_start() if locking attempts fails.

2012-03-16 Thread santosh nayak
From: Santosh Nayak santoshprasadna...@gmail.com If locking attempt was interrupted by a signal then we should return -EINTR so that caller can take appropriate action. We have 3 callers: gigaset_probe(), gigaset_tty_open() and gigaset_probe(). Each caller tries to free allocated memory if lock