16 Oct
2012
16 Oct
'12
7:46 p.m.
pablo@gnumonks.org wrote:
@@ -671,9 +674,9 @@ int abis_nm_rcvmsg(struct msgb *msg) default: LOGP(DNM, LOGL_ERROR, "unknown ABIS OML message discriminator 0x%x\n", oh->mdisc); - return -EINVAL; + rc = -EINVAL; }
It looks like this is at the end of a switch () statement, so maybe it is a good idea to include a goto statement for clarity, even if that is not absolutely neccessary given how the code looks right now.
- +err: msgb_free(msg); return rc; }
Since the label is not only an error path but also reached during successful flow through the function I suggest to name it something like "done" instead. Thanks a lot for fixing these leaks! //Peter