Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: dsa: mv88e6xxx: add an error code check in mv88e6352_tai_event_work

mv88e6xxx_tai_write() can return error code (-EOPNOTSUPP ...) if failed.
So check the value of 'ret' after calling mv88e6xxx_tai_write().

Signed-off-by: Su Hui <suhui@nfschina.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Su Hui and committed by
David S. Miller
a792197f ee3d1228

+4
+4
drivers/net/dsa/mv88e6xxx/ptp.c
··· 182 182 mv88e6xxx_reg_lock(chip); 183 183 err = mv88e6xxx_tai_write(chip, MV88E6XXX_TAI_EVENT_STATUS, status[0]); 184 184 mv88e6xxx_reg_unlock(chip); 185 + if (err) { 186 + dev_err(chip->dev, "failed to write TAI status register\n"); 187 + return; 188 + } 185 189 186 190 /* This is an external timestamp */ 187 191 ev.type = PTP_CLOCK_EXTTS;