public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: coverity-bot <keescook@chromium•org>
To: Stefan Wahren <stefan.wahren@i2se•com>
Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse•de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor•com>,
	linux-next@vger•kernel.org
Subject: Coverity: mmal_setup_video_component(): Code maintainability issues
Date: Tue, 14 Apr 2020 08:33:08 -0700	[thread overview]
Message-ID: <202004140833.632892C8@keescook> (raw)

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20200414 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Sun Mar 29 14:44:58 2020 +0200
    1a59532382a6 ("staging: bcm2835-camera: Move video component setup in its own function")

Coverity reported the following:

*** CID 1492591:  Code maintainability issues  (UNUSED_VALUE)
/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c: 1014 in mmal_setup_video_component()
1008     	if (overlay_enabled) {
1009     		/* Need to disable the overlay before we can update
1010     		 * the resolution
1011     		 */
1012     		ret = vchiq_mmal_port_disable(dev->instance, preview_port);
1013     		if (!ret) {
vvv     CID 1492591:  Code maintainability issues  (UNUSED_VALUE)
vvv     Assigning value from "vchiq_mmal_port_connect_tunnel(dev->instance, preview_port, NULL)" to "ret" here, but that stored value is overwritten before it can be used.
1014     			ret = vchiq_mmal_port_connect_tunnel(dev->instance,
1015     							     preview_port,
1016     							     NULL);
1017     		}
1018     	}
1019     	preview_port->es.video.width = f->fmt.pix.width;

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium•org>
Addresses-Coverity-ID: 1492591 ("Code maintainability issues")
Fixes: 1a59532382a6 ("staging: bcm2835-camera: Move video component setup in its own function")

Thanks for your attention!

-- 
Coverity-bot

             reply	other threads:[~2020-04-14 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 15:33 coverity-bot [this message]
2020-04-14 16:49 ` Coverity: mmal_setup_video_component(): Code maintainability issues Stefan Wahren
2020-04-16 10:18   ` Dave Stevenson

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=202004140833.632892C8@keescook \
    --to=keescook@chromium$(echo .)org \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=gustavo@embeddedor$(echo .)com \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=nsaenzjulienne@suse$(echo .)de \
    --cc=stefan.wahren@i2se$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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