misc: xilinx_sdfec: Prevent a divide by zero in xsdfec_reg0_write()
The "psize" value comes from the user so we need to verify that it's non-zero before we check if "n % psize" or it will crash. Fixes: 20ec628e ("misc: xilinx_sdfec: Add ability to configure LDPC") Signed-off-by:Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by:
Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/20190821070953.GC26957@mwandaSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment