Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
From: Marcel Holtmann <[EMAIL PROTECTED]> Date: Tue, 25 Sep 2007 00:18:07 +0200 > Hi Wang, > > > This patch: > > - makes hidp_setup_input() return int to indicate errors; > > - checks its return value to handle errors. > > > > And this time it is against -rc7-mm1 tree. > > > > Thanks to roel and Marcel Holtmann for comments. > > > > Signed-off-by: WANG Cong <[EMAIL PROTECTED]> > > Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]> Applied, thanks. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
From: Marcel Holtmann [EMAIL PROTECTED] Date: Tue, 25 Sep 2007 00:18:07 +0200 Hi Wang, This patch: - makes hidp_setup_input() return int to indicate errors; - checks its return value to handle errors. And this time it is against -rc7-mm1 tree. Thanks to roel and Marcel Holtmann for comments. Signed-off-by: WANG Cong [EMAIL PROTECTED] Signed-off-by: Marcel Holtmann [EMAIL PROTECTED] Applied, thanks. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
Hi Wang, > This patch: > - makes hidp_setup_input() return int to indicate errors; > - checks its return value to handle errors. > > And this time it is against -rc7-mm1 tree. > > Thanks to roel and Marcel Holtmann for comments. > > Signed-off-by: WANG Cong <[EMAIL PROTECTED]> Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]> Regards Marcel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
This patch: - makes hidp_setup_input() return int to indicate errors; - checks its return value to handle errors. And this time it is against -rc7-mm1 tree. Thanks to roel and Marcel Holtmann for comments. Signed-off-by: WANG Cong <[EMAIL PROTECTED]> --- net/bluetooth/hidp/core.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) Index: linux-2.6.23-rc7-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc7-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc7-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? >dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session->input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input->event = hidp_input_event; - input_register_device(input); + return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -822,8 +822,11 @@ int hidp_add_connection(struct hidp_conn session->flags = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID); session->idle_to = req->idle_to; - if (session->input) - hidp_setup_input(session, req); + if (session->input) { + err = hidp_setup_input(session, req); + if (err < 0) + goto failed; + } if (session->hid) hidp_setup_hid(session, req); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
Hi, > > This patch does the following things: > > > > - Make hidp_setup_input() return int to indicate errors. > > - Check its return value to handle errors. > > > > Signed-off-by: WANG Cong <[EMAIL PROTECTED]> > > > > --- > > net/bluetooth/hidp/core.c |7 --- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c > > === > > --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c > > +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c > > @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st > > return conn ? >dev : NULL; > > } > > > > -static inline void hidp_setup_input(struct hidp_session *session, struct > > hidp_connadd_req *req) > > +static inline int hidp_setup_input(struct hidp_session *session, struct > > hidp_connadd_req *req) > > { > > struct input_dev *input = session->input; > > int i; > > @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru > > > > input->event = hidp_input_event; > > > > - input_register_device(input); > > + return input_register_device(input); > > } > > > > static int hidp_open(struct hid_device *hid) > > @@ -823,7 +823,8 @@ int hidp_add_connection(struct hidp_conn > > session->idle_to = req->idle_to; > > > > if (session->input) > > - hidp_setup_input(session, req); > > + if ((err = (hidp_setup_input(session, req > > + goto failed; > > This is confusing, why not just do > > if (session->input) { > err = hidp_setup_input(session, req); > if (err) > goto failed; > } lets use "if (err < 0)" and I am okay with that patch. Regards Marcel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
Hi, This patch does the following things: - Make hidp_setup_input() return int to indicate errors. - Check its return value to handle errors. Signed-off-by: WANG Cong [EMAIL PROTECTED] --- net/bluetooth/hidp/core.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? conn-dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session-input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input-event = hidp_input_event; - input_register_device(input); + return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -823,7 +823,8 @@ int hidp_add_connection(struct hidp_conn session-idle_to = req-idle_to; if (session-input) - hidp_setup_input(session, req); + if ((err = (hidp_setup_input(session, req + goto failed; This is confusing, why not just do if (session-input) { err = hidp_setup_input(session, req); if (err) goto failed; } lets use if (err 0) and I am okay with that patch. Regards Marcel - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
This patch: - makes hidp_setup_input() return int to indicate errors; - checks its return value to handle errors. And this time it is against -rc7-mm1 tree. Thanks to roel and Marcel Holtmann for comments. Signed-off-by: WANG Cong [EMAIL PROTECTED] --- net/bluetooth/hidp/core.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) Index: linux-2.6.23-rc7-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc7-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc7-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? conn-dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session-input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input-event = hidp_input_event; - input_register_device(input); + return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -822,8 +822,11 @@ int hidp_add_connection(struct hidp_conn session-flags = req-flags (1 HIDP_BLUETOOTH_VENDOR_ID); session-idle_to = req-idle_to; - if (session-input) - hidp_setup_input(session, req); + if (session-input) { + err = hidp_setup_input(session, req); + if (err 0) + goto failed; + } if (session-hid) hidp_setup_hid(session, req); - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
Hi Wang, This patch: - makes hidp_setup_input() return int to indicate errors; - checks its return value to handle errors. And this time it is against -rc7-mm1 tree. Thanks to roel and Marcel Holtmann for comments. Signed-off-by: WANG Cong [EMAIL PROTECTED] Signed-off-by: Marcel Holtmann [EMAIL PROTECTED] Regards Marcel - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[Resend][-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
This patch does the following things: - Make hidp_setup_input() return int to indicate errors. - Check its return value to handle errors. Thanks to roel for comments. Signed-off-by: WANG Cong <[EMAIL PROTECTED]> --- net/bluetooth/hidp/core.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? >dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session->input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input->event = hidp_input_event; - input_register_device(input); + return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -822,8 +822,11 @@ int hidp_add_connection(struct hidp_conn session->flags = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID); session->idle_to = req->idle_to; - if (session->input) - hidp_setup_input(session, req); + if (session->input) { + err = hidp_setup_input(session, req); + if (err) + goto failed; + } if (session->hid) hidp_setup_hid(session, req); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
On Mon, Sep 24, 2007 at 12:13:22AM +0200, roel wrote: >WANG Cong wrote: >> This patch does the following things: >> >> - Make hidp_setup_input() return int to indicate errors. >> - Check its return value to handle errors. >> >> Signed-off-by: WANG Cong <[EMAIL PROTECTED]> >> >> --- >> net/bluetooth/hidp/core.c |7 --- >> 1 file changed, 4 insertions(+), 3 deletions(-) >> >> Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c >> === >> --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c >> +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c >> @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st >> return conn ? >dev : NULL; >> } >> >> -static inline void hidp_setup_input(struct hidp_session *session, struct >> hidp_connadd_req *req) >> +static inline int hidp_setup_input(struct hidp_session *session, struct >> hidp_connadd_req *req) >> { >> struct input_dev *input = session->input; >> int i; >> @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru >> >> input->event = hidp_input_event; >> >> -input_register_device(input); >> +return input_register_device(input); >> } >> >> static int hidp_open(struct hid_device *hid) >> @@ -823,7 +823,8 @@ int hidp_add_connection(struct hidp_conn >> session->idle_to = req->idle_to; >> >> if (session->input) >> -hidp_setup_input(session, req); >> +if ((err = (hidp_setup_input(session, req >> +goto failed; > >This is confusing, why not just do > > if (session->input) { > err = hidp_setup_input(session, req); > if (err) > goto failed; > } Yes, you are right. Thanks. I will resend this patch. ;) -- "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
WANG Cong wrote: > This patch does the following things: > > - Make hidp_setup_input() return int to indicate errors. > - Check its return value to handle errors. > > Signed-off-by: WANG Cong <[EMAIL PROTECTED]> > > --- > net/bluetooth/hidp/core.c |7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c > === > --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c > +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c > @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st > return conn ? >dev : NULL; > } > > -static inline void hidp_setup_input(struct hidp_session *session, struct > hidp_connadd_req *req) > +static inline int hidp_setup_input(struct hidp_session *session, struct > hidp_connadd_req *req) > { > struct input_dev *input = session->input; > int i; > @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru > > input->event = hidp_input_event; > > - input_register_device(input); > + return input_register_device(input); > } > > static int hidp_open(struct hid_device *hid) > @@ -823,7 +823,8 @@ int hidp_add_connection(struct hidp_conn > session->idle_to = req->idle_to; > > if (session->input) > - hidp_setup_input(session, req); > + if ((err = (hidp_setup_input(session, req > + goto failed; This is confusing, why not just do if (session->input) { err = hidp_setup_input(session, req); if (err) goto failed; } > > if (session->hid) > hidp_setup_hid(session, req); > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
WANG Cong wrote: This patch does the following things: - Make hidp_setup_input() return int to indicate errors. - Check its return value to handle errors. Signed-off-by: WANG Cong [EMAIL PROTECTED] --- net/bluetooth/hidp/core.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? conn-dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session-input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input-event = hidp_input_event; - input_register_device(input); + return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -823,7 +823,8 @@ int hidp_add_connection(struct hidp_conn session-idle_to = req-idle_to; if (session-input) - hidp_setup_input(session, req); + if ((err = (hidp_setup_input(session, req + goto failed; This is confusing, why not just do if (session-input) { err = hidp_setup_input(session, req); if (err) goto failed; } if (session-hid) hidp_setup_hid(session, req); - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
On Mon, Sep 24, 2007 at 12:13:22AM +0200, roel wrote: WANG Cong wrote: This patch does the following things: - Make hidp_setup_input() return int to indicate errors. - Check its return value to handle errors. Signed-off-by: WANG Cong [EMAIL PROTECTED] --- net/bluetooth/hidp/core.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? conn-dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session-input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input-event = hidp_input_event; -input_register_device(input); +return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -823,7 +823,8 @@ int hidp_add_connection(struct hidp_conn session-idle_to = req-idle_to; if (session-input) -hidp_setup_input(session, req); +if ((err = (hidp_setup_input(session, req +goto failed; This is confusing, why not just do if (session-input) { err = hidp_setup_input(session, req); if (err) goto failed; } Yes, you are right. Thanks. I will resend this patch. ;) -- Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[Resend][-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
This patch does the following things: - Make hidp_setup_input() return int to indicate errors. - Check its return value to handle errors. Thanks to roel for comments. Signed-off-by: WANG Cong [EMAIL PROTECTED] --- net/bluetooth/hidp/core.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? conn-dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session-input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input-event = hidp_input_event; - input_register_device(input); + return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -822,8 +822,11 @@ int hidp_add_connection(struct hidp_conn session-flags = req-flags (1 HIDP_BLUETOOTH_VENDOR_ID); session-idle_to = req-idle_to; - if (session-input) - hidp_setup_input(session, req); + if (session-input) { + err = hidp_setup_input(session, req); + if (err) + goto failed; + } if (session-hid) hidp_setup_hid(session, req); - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
This patch does the following things: - Make hidp_setup_input() return int to indicate errors. - Check its return value to handle errors. Signed-off-by: WANG Cong <[EMAIL PROTECTED]> --- net/bluetooth/hidp/core.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? >dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session->input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input->event = hidp_input_event; - input_register_device(input); + return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -823,7 +823,8 @@ int hidp_add_connection(struct hidp_conn session->idle_to = req->idle_to; if (session->input) - hidp_setup_input(session, req); + if ((err = (hidp_setup_input(session, req + goto failed; if (session->hid) hidp_setup_hid(session, req); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[-mm Patch] net/bluetooth/hidp/core.c: Make hidp_setup_input() return int
This patch does the following things: - Make hidp_setup_input() return int to indicate errors. - Check its return value to handle errors. Signed-off-by: WANG Cong [EMAIL PROTECTED] --- net/bluetooth/hidp/core.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Index: linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c === --- linux-2.6.23-rc6-mm1.orig/net/bluetooth/hidp/core.c +++ linux-2.6.23-rc6-mm1/net/bluetooth/hidp/core.c @@ -625,7 +625,7 @@ static struct device *hidp_get_device(st return conn ? conn-dev : NULL; } -static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) +static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input = session-input; int i; @@ -669,7 +669,7 @@ static inline void hidp_setup_input(stru input-event = hidp_input_event; - input_register_device(input); + return input_register_device(input); } static int hidp_open(struct hid_device *hid) @@ -823,7 +823,8 @@ int hidp_add_connection(struct hidp_conn session-idle_to = req-idle_to; if (session-input) - hidp_setup_input(session, req); + if ((err = (hidp_setup_input(session, req + goto failed; if (session-hid) hidp_setup_hid(session, req); - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/