linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: Input: cyapa - add gen5 trackpad device basic functions support
@ 2015-01-21 13:19 Dan Carpenter
  2015-01-22  1:50 ` Dudley Du
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2015-01-21 13:19 UTC (permalink / raw)
  To: dudl; +Cc: linux-input

Hello Dudley Du,

This is a semi-automatic email about new static checker warnings.

The patch 6972a859601a: "Input: cyapa - add gen5 trackpad device
basic functions support" from Jan 17, 2015, leads to the following
Smatch complaint:

drivers/input/mouse/cyapa_gen5.c:2564 cyapa_gen5_irq_cmd_handler()
	 warn: variable dereferenced before check 'gen5_pip->resp_len' (see line 2559)

drivers/input/mouse/cyapa_gen5.c
  2558				 */
  2559				length = *gen5_pip->resp_len;
                                         ^^^^^^^^^^^^^^^^^^^
Patch introduces a dereference.

  2560				cyapa_empty_pip_output_data(cyapa,
  2561						gen5_pip->resp_data,
  2562						&length,
  2563						gen5_pip->resp_sort_func);
  2564				if (gen5_pip->resp_len && length != 0) {
                                    ^^^^^^^^^^^^^^^^^^
Patch introduces a check.

  2565					*gen5_pip->resp_len = length;
  2566					atomic_dec(&gen5_pip->cmd_issued);

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-22  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-21 13:19 Input: cyapa - add gen5 trackpad device basic functions support Dan Carpenter
2015-01-22  1:50 ` Dudley Du
2015-01-22  8:31   ` Dan Carpenter
2015-01-22  8:44     ` Dudley Du

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).