re: Input: cyapa - add gen5 trackpad device basic functions support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux