Re: [PATCH] phy: cadence-torrent: Check return value on register read

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

 



> 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@xxxxxxxxxxx>

* 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





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux