ath11k: driver for Qualcomm IEEE 802.11ax devices
Hello Kalle Valo,
This is a semi-automatic email about new static checker warnings.
The patch d5c65159f289: "ath11k: driver for Qualcomm IEEE 802.11ax devices" from Nov 23, 2019, leads to the following Smatch complaint:
drivers/net/wireless/ath/ath11k/debug.c:575 ath11k_write_simulate_fw_crash()
error: we previously assumed 'ar' could be null (see line 549)
drivers/net/wireless/ath/ath11k/debug.c
548 ar = pdev->ar;
549 if (ar && ar->state == ATH11K_STATE_ON) {
^^Check for NULL
550 radioup = 1;
551 break;
552 }
553 }
554 /* filter partial writes and invalid commands */
555 if (*ppos != 0 || count >= sizeof(buf) || count == 0)
556 return -EINVAL;
557
558 rc = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
559 if (rc < 0)
560 return rc;
561
562 /* drop the possible '\n' from the end */
563 if (buf[*ppos - 1] == '\n')
564 buf[*ppos - 1] = '\0';
565
566 if (radioup == 0) {
567 ret = -ENETDOWN;
568 goto exit;
569 }
570
571 if (!strcmp(buf, "assert")) {
572 ath11k_info(ab, "simulating firmware assert crash\n");
573 ret = ath11k_wmi_force_fw_hang_cmd(ar,
^^
Unchecked dereference inside function
574 ATH11K_WMI_FW_HANG_ASSERT_TYPE,
575 ATH11K_WMI_FW_HANG_DELAY);
576 } else {
577 ret = -EINVAL;regards,
dan carpenter
_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k