Skip to content

Commit

Permalink
misc: xilinx-sdfec: cleanup return value in xsdfec_table_write()
Browse files Browse the repository at this point in the history
Return 0 for success, rather than the value of an incrementing
"reg" index. The reg value was never actually used, so this
simplifies the caller slightly.

Cc: Derek Kiernan <derek.kiernan@xilinx.com>
Cc: Dragan Cvetic <dragan.cvetic@xilinx.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Link: https://lore.kernel.org/r/20200527012628.1100649-3-jhubbard@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
John Hubbard authored and Greg Kroah-Hartman committed May 27, 2020
1 parent 57343d5 commit d25594d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/misc/xilinx_sdfec.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ static int xsdfec_table_write(struct xsdfec_dev *xsdfec, u32 offset,
((reg * XSDFEC_REG_WIDTH_JUMP) % PAGE_SIZE));
put_page(pages[i]);
}
return reg;
return 0;
}

static int xsdfec_add_ldpc(struct xsdfec_dev *xsdfec, void __user *arg)
Expand Down Expand Up @@ -722,8 +722,6 @@ static int xsdfec_add_ldpc(struct xsdfec_dev *xsdfec, void __user *arg)
ret = xsdfec_table_write(xsdfec, 4 * ldpc->qc_off, ldpc->qc_table,
ldpc->nqc, XSDFEC_LDPC_QC_TABLE_ADDR_BASE,
XSDFEC_QC_TABLE_DEPTH);
if (ret > 0)
ret = 0;
err_out:
kfree(ldpc);
return ret;
Expand Down

0 comments on commit d25594d

Please sign in to comment.