[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1331915038-11231-1-git-send-email-santoshprasadnayak@gmail.com>
Date: Fri, 16 Mar 2012 21:53:58 +0530
From: santosh nayak <santoshprasadnayak@...il.com>
To: mchehab@...radead.org
Cc: gregkh@...uxfoundation.org, khoroshilov@...ras.ru,
linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Santosh Nayak <santoshprasadnayak@...il.com>
Subject: [PATCH] [media] staging: Return -EINTR in s2250_probe() if fails to get lock.
From: Santosh Nayak <santoshprasadnayak@...il.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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists