From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: staging: ozwpan: Added basic L2 protocol support
Date: Tue, 28 Feb 2012 06:36:40 +0000 [thread overview]
Message-ID: <20120228063640.GA20506@elgon.mountain> (raw)
Hello Chris Kelly,
This is a semi-automatic email about new static checker warnings.
The patch 1619cb6f2dd9: "staging: ozwpan: Added basic L2 protocol
support" from Feb 20, 2012, leads to the following Smatch complaint:
drivers/staging/ozwpan/ozproto.c:919 oz_protocol_init()
error: we previously assumed 'devs' could be null (see line 915)
drivers/staging/ozwpan/ozproto.c
914 skb_queue_head_init(&g_rx_queue);
915 if (devs && (devs[0] = '*')) {
^^^^
Checked.
916 oz_binding_add(0);
917 } else {
918 char d[32];
919 while (*devs) {
^^^^^
Dereferenced without checking.
920 devs = oz_get_next_device_name(devs, d, sizeof(d));
921 if (d[0])
Actually there are a bunch of Smatch warnings for this driver if someone
wanted something to cleanup.
drivers/staging/ozwpan/ozusbsvc.c:71 oz_usb_start() warn: returning -1 instead of -ENOMEM is sloppy
drivers/staging/ozwpan/ozhcd.c:283 oz_free_urb_link() info: redundant null check on urbl calling kfree()
drivers/staging/ozwpan/ozhcd.c:1733 oz_hcd_urb_enqueue() info: why not propagate 'port_ix' from oz_get_port_from_addr() instead of -32?
drivers/staging/ozwpan/ozpd.c:180 oz_pd_alloc() error: potential null derefence 'pd'.
drivers/staging/ozwpan/ozpd.c:392 oz_tx_frame_free() warn: 'f' was already freed.
drivers/staging/ozwpan/ozpd.c:393 oz_tx_frame_free() info: redundant null check on f calling kfree()
drivers/staging/ozwpan/ozpd.c:654 oz_isoc_stream_create() warn: returning -1 instead of -ENOMEM is sloppy
drivers/staging/ozwpan/ozpd.c:664 oz_isoc_stream_create() info: redundant null check on st calling kfree()
drivers/staging/ozwpan/ozproto.c:560 oz_protocol_timer() info: redundant null check on t calling kfree()
drivers/staging/ozwpan/ozproto.c:919 oz_protocol_init() error: we previously assumed 'devs' could be null (see line 915)
drivers/staging/ozwpan/ozcdev.c:406 oz_cdev_start() warn: returning -1 instead of -ENOMEM is sloppy
drivers/staging/ozwpan/ozeltbuf.c:138 oz_elt_stream_create() warn: returning -1 instead of -ENOMEM is sloppy
regards,
dan carpenter
reply other threads:[~2012-02-28 6:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120228063640.GA20506@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox