From: santosh nayak <santoshprasadnayak@gmail.com>
To: mchehab@infradead.org
Cc: gregkh@linuxfoundation.org, khoroshilov@ispras.ru,
linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Santosh Nayak <santoshprasadnayak@gmail.com>
Subject: [PATCH] [media] staging: Return -EINTR in s2250_probe() if fails to get lock.
Date: Fri, 16 Mar 2012 21:53:58 +0530 [thread overview]
Message-ID: <1331915038-11231-1-git-send-email-santoshprasadnayak@gmail.com> (raw)
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
next reply other threads:[~2012-03-16 16:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 16:23 santosh nayak [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331915038-11231-1-git-send-email-santoshprasadnayak@gmail.com \
--to=santoshprasadnayak@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=khoroshilov@ispras.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®