Re: [PATCH net-next v4 08/12] net: ethernet: oa_tc6: implement transmit path to transfer tx ethernet frames

From: Andrew Lunn
Date: Tue Apr 23 2024 - 20:03:03 EST


> +static int oa_tc6_process_extended_status(struct oa_tc6 *tc6)
> +{
> + u32 value;
> + int ret;
> +
> + ret = oa_tc6_read_register(tc6, OA_TC6_REG_STATUS0, &value);
> + if (ret) {
> + netdev_err(tc6->netdev, "STATUS0 register read failed: %d\n",
> + ret);
> + return -ENODEV;
> + }
> +
> + /* Clear the error interrupts status */
> + ret = oa_tc6_write_register(tc6, OA_TC6_REG_STATUS0, value);
> + if (ret) {
> + netdev_err(tc6->netdev, "STATUS0 register write failed: %d\n",
> + ret);
> + return -ENODEV;

More examples where you replace one error code with a different one.

Andrew