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>
This commit is contained in:
parent
ee3d122854
commit
a792197f50
@ -182,6 +182,10 @@ static void mv88e6352_tai_event_work(struct work_struct *ugly)
|
||||
mv88e6xxx_reg_lock(chip);
|
||||
err = mv88e6xxx_tai_write(chip, MV88E6XXX_TAI_EVENT_STATUS, status[0]);
|
||||
mv88e6xxx_reg_unlock(chip);
|
||||
if (err) {
|
||||
dev_err(chip->dev, "failed to write TAI status register\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* This is an external timestamp */
|
||||
ev.type = PTP_CLOCK_EXTTS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user