mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [media] staging: Return -EINTR in s2250_probe() if fails to get lock.
@ 2012-03-16 16:23 santosh nayak
  2012-03-16 16:32 ` Oliver Neukum
  0 siblings, 1 reply; 6+ messages in thread
From: santosh nayak @ 2012-03-16 16:23 UTC (permalink / raw)
  To: mchehab
  Cc: gregkh, khoroshilov, linux-media, devel, linux-kernel,
	kernel-janitors, Santosh Nayak

From: Santosh Nayak <santoshprasadnayak@gmail.com>

In s2250_probe(), If locking attempt is interrupted by a signal then
it should return -EINTR after unregistering audio device and making free
the allocated memory.

At present, if locking is interrupted by signal it will display message
"initialized successfully" and return success.  This is wrong.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
 drivers/staging/media/go7007/s2250-board.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/media/go7007/s2250-board.c b/drivers/staging/media/go7007/s2250-board.c
index 014d384..2823bbf 100644
--- a/drivers/staging/media/go7007/s2250-board.c
+++ b/drivers/staging/media/go7007/s2250-board.c
@@ -657,6 +657,10 @@ static int s2250_probe(struct i2c_client *client,
 			kfree(data);
 		}
 		mutex_unlock(&usb->i2c_lock);
+	} else {
+		i2c_unregister_device(audio);
+		kfree(state);
+		return -EINTR;
 	}
 
 	v4l2_info(sd, "initialized successfully\n");
-- 
1.7.4.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-17 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16 16:23 [PATCH] [media] staging: Return -EINTR in s2250_probe() if fails to get lock santosh nayak
2012-03-16 16:32 ` Oliver Neukum
2012-03-16 16:56   ` santosh prasad nayak
2012-03-16 17:59     ` Oliver Neukum
2012-03-17 16:00       ` santosh prasad nayak
2012-03-17 16:20         ` Oliver Neukum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®