On Thu, 23 Jun 2011 13:54:56 +0200, Amit Nagal <helloin.amit@xxxxxxxxx>
wrote:
2011/6/23 Michal Nazarewicz <mina86@xxxxxxxxxx>:
On Thu, 23 Jun 2011 13:13:58 +0200, Amit Nagal <helloin.amit@xxxxxxxxx>
since in skel_open() , file->private_data saves dev with (
file->private_data = dev ) statement ,
Not always. There are two “goto exit” statements that will skip setting
of the file->private_data.
Ya , but "goto exit" are there to handle error conditions , which
will finally lead to failure of open() call in userspace .
since open() fails , application wont get valid fd for calling
close() , and thus skel_release won't execute at all .
Ah, right. Well, in that case I suspect it's just a sanity check.
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +-----<email/xmpp: mnazarewicz@xxxxxxxxxx>-----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html