Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647387
| From | Vlad Yasevich <vyasevic@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init() |
| Date | 2017-05-22 23:00 +0200 |
| Message-ID | <tK2AP-1ZI-29@gated-at.bofh.it> (permalink) |
| References | <tJYxb-83k-11@gated-at.bofh.it> <tJYxc-83k-27@gated-at.bofh.it> |
| Organization | Red Hat |
On 05/22/2017 12:38 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 22 May 2017 17:28:14 +0200
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> net/sctp/protocol.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 2b1a6215bd2f..5e7c8a344770 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1447,5 +1447,4 @@ static __init int sctp_init(void)
> if (!sctp_ep_hashtable) {
> - pr_err("Failed endpoint_hash alloc\n");
> status = -ENOMEM;
> goto err_ehash_alloc;
> }
>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
At the time this was written, it was patterned after TCP. Since then TCP changed
significantly. We can surely clean-up the pr_err() here and possibly update the
code as well later.
-vlad
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] net-SCTP: Adjustments for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 18:40 +0200
[PATCH 1/5] sctp: Use kmalloc_array() in sctp_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 18:40 +0200
Re: [PATCH 1/5] sctp: Use kmalloc_array() in sctp_init() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-05-22 22:00 +0200
Re: [PATCH 1/5] sctp: Use kmalloc_array() in sctp_init() Vlad Yasevich <vyasevic@redhat.com> - 2017-05-22 23:00 +0200
[PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 18:40 +0200
Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-05-22 19:00 +0200
Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 21:50 +0200
Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-05-22 22:00 +0200
Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-05-22 22:00 +0200
Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init() Vlad Yasevich <vyasevic@redhat.com> - 2017-05-22 23:00 +0200
[PATCH 5/5] sctp: Adjust one function call together with a variable assignment SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 18:50 +0200
Re: [PATCH 5/5] sctp: Adjust one function call together with a variable assignment Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-05-22 22:00 +0200
Re: [PATCH 5/5] sctp: Adjust one function call together with a variable assignment Vlad Yasevich <vyasevic@redhat.com> - 2017-05-22 23:10 +0200
[PATCH 3/5] sctp: Fix a typo in a comment line in sctp_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 18:50 +0200
Re: [PATCH 3/5] sctp: Fix a typo in a comment line in sctp_init() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-05-22 22:00 +0200
Re: [PATCH 3/5] sctp: Fix a typo in a comment line in sctp_init() Vlad Yasevich <vyasevic@redhat.com> - 2017-05-22 23:10 +0200
[PATCH 4/5] sctp: Improve a size determination in sctp_inetaddr_event() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 18:50 +0200
Re: [PATCH 4/5] sctp: Improve a size determination in sctp_inetaddr_event() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-05-22 22:00 +0200
Re: [PATCH 4/5] sctp: Improve a size determination in sctp_inetaddr_event() Vlad Yasevich <vyasevic@redhat.com> - 2017-05-22 23:10 +0200
Re: [PATCH 0/5] net-SCTP: Adjustments for three function implementations Xin Long <lucien.xin@gmail.com> - 2017-05-23 08:40 +0200
csiph-web