All of lore.kernel.org
 help / color / mirror / Atom feed
* Coverity: tcpm_handle_alert(): Error handling issues
@ 2021-06-08 18:02 coverity-bot
  0 siblings, 0 replies; only message in thread
From: coverity-bot @ 2021-06-08 18:02 UTC (permalink / raw)
  To: Kyle Tso; +Cc: Greg Kroah-Hartman, Gustavo A. R. Silva, linux-next

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20210608 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:

  Fri Jun 4 13:24:16 2021 +0200
    063933f47a7a ("usb: typec: tcpm: Properly handle Alert and Status Messages")

Coverity reported the following:

*** CID 1505153:  Error handling issues  (CHECKED_RETURN)
/drivers/usb/typec/tcpm/tcpm.c: 2227 in tcpm_handle_alert()
2221     	}
2222
2223     	/* Just handling non-battery alerts for now */
2224     	if (!(type & USB_PD_ADO_TYPE_BATT_STATUS_CHANGE)) {
2225     		if (port->pwr_role == TYPEC_SOURCE) {
2226     			port->upcoming_state = GET_STATUS_SEND;
vvv     CID 1505153:  Error handling issues  (CHECKED_RETURN)
vvv     Calling "tcpm_ams_start" without checking return value (as is done elsewhere 15 out of 17 times).
2227     			tcpm_ams_start(port, GETTING_SOURCE_SINK_STATUS);
2228     		} else {
2229     			/*
2230     			 * Do not check SinkTxOk here in case the Source doesn't set its Rp to
2231     			 * SinkTxOk in time.
2232     			 */

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: 1505153 ("Error handling issues")
Fixes: 063933f47a7a ("usb: typec: tcpm: Properly handle Alert and Status Messages")

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-08 18:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 18:02 Coverity: tcpm_handle_alert(): Error handling issues coverity-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.