From: Dan Carpenter <dan.carpenter@linaro.org>
To: Pengyu Luo <mitltlatltl@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: [bug report] usb: typec: ucsi: add Huawei Matebook E Go ucsi driver
Date: Tue, 15 Apr 2025 13:45:34 +0300 [thread overview]
Message-ID: <Z_44zoTyLLdXNkKT@stanley.mountain> (raw)
Hello Pengyu Luo,
Commit 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi
driver") from Mar 16, 2025 (linux-next), leads to the following
Smatch static checker warning:
drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c:372 gaokun_ucsi_notify()
error: uninitialized symbol 'cci'.
drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c
358 static int gaokun_ucsi_notify(struct notifier_block *nb,
359 unsigned long action, void *data)
360 {
361 u32 cci;
362 struct gaokun_ucsi *uec = container_of(nb, struct gaokun_ucsi, nb);
363
364 switch (action) {
365 case EC_EVENT_USB:
366 gaokun_ucsi_complete_usb_ack(uec);
367 gaokun_ucsi_altmode_notify_ind(uec);
368 return NOTIFY_OK;
369
370 case EC_EVENT_UCSI:
371 gaokun_ucsi_read_cci(uec->ucsi, &cci);
^^^^
No error checking.
--> 372 ucsi_notify_common(uec->ucsi, cci);
373 if (UCSI_CCI_CONNECTOR(cci))
374 gaokun_ucsi_handle_no_usb_event(uec, UCSI_CCI_CONNECTOR(cci) - 1);
375
376 return NOTIFY_OK;
377
378 default:
379 return NOTIFY_DONE;
380 }
381 }
regards,
dan carpenter
next reply other threads:[~2025-04-15 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 10:45 Dan Carpenter [this message]
2025-04-15 17:51 ` [bug report] usb: typec: ucsi: add Huawei Matebook E Go ucsi driver Pengyu Luo
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=Z_44zoTyLLdXNkKT@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=linux-usb@vger.kernel.org \
--cc=mitltlatltl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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