[PATCH] phy: cadence-torrent: Check return value on register read
Markus Elfring
Markus.Elfring at web.de
Tue Jul 2 00:43:17 PDT 2024
> cdns_torrent_dp_set_power_state() does not consider that ret might be
> overwritten. Add return value check of regmap_read_poll_timeout() after
> register read in cdns_torrent_dp_set_power_state().
I suggest to improve such a change description another bit.
1. A return value is stored in the mentioned local variable.
2. Unfortunately, it was not immediately checked.
* https://cwe.mitre.org/data/definitions/252.html
* https://wiki.sei.cmu.edu/confluence/display/c/EXP12-C.+Do+not+ignore+values+returned+by+functions
3. How do you think about to avoid a repeated reference to a function name?
…
> Signed-off-by: Ma Ke <make24 at iscas.ac.cn>
* Why was the personal name “Haoxiang Li” not specified here?
* Under which circumstances will applications of the Developer's Certificate of Origin
be clarified better?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc6#n398
How do you think about to use a summary phrase like “Complete error handling
in cdns_torrent_dp_set_power_state()”?
Regards,
Markus
More information about the linux-phy
mailing list