On 01/10/25 06:09, Jakub Kicinski wrote:
On Tue, 30 Sep 2025 14:19:02 +0530 Bhanu Seshu Kumar Valluri wrote:
quoted
+ if (dev->chipid == ID_REV_CHIP_ID_7800_) {
+ int rc = lan78xx_write_reg(dev, HW_CFG, saved);
+ /* If USB fails, there is nothing to do */
+ if (rc < 0)
+ return rc;
+ }
+ return ret;
I don't think you need to add and handle rc here separately?
rc can only be <= so save the answer to ret and "fall thru"?
The fall thru path might have been reached with ret holding EEPROM read timeout
error status. So if ret is used instead of rc it might over write the ret with 0 when
lan78xx_write_reg returns success and timeout error status would be lost.
Thank you.