Re: [PATCH 2/2] spi: s3c64xx: fix potential division by zero

2017-02-07 Thread Andi Shyti
> > This patch fixes '1397922 Division or modulo by zero' from > > scan.coverity.com > > It is a false positive. Yes... sorry for these two spam/patches... they are just fast after holiday "fixes"... please ignore them. Andi

Re: [PATCH 2/2] spi: s3c64xx: fix potential division by zero

2017-02-07 Thread Andi Shyti
> > This patch fixes '1397922 Division or modulo by zero' from > > scan.coverity.com > > It is a false positive. Yes... sorry for these two spam/patches... they are just fast after holiday "fixes"... please ignore them. Andi

Re: [PATCH 2/2] spi: s3c64xx: fix potential division by zero

2017-02-07 Thread Krzysztof Kozlowski
On Tue, Feb 07, 2017 at 05:10:25PM +0900, Andi Shyti wrote: > Even though it's quite unlikely to happen in this particular > case, clk_get_rate can return '0' if sdd->src_clk is not set > properly. In that case we would have a clear division by '0'. > I do not think it is possible. if

Re: [PATCH 2/2] spi: s3c64xx: fix potential division by zero

2017-02-07 Thread Krzysztof Kozlowski
On Tue, Feb 07, 2017 at 05:10:25PM +0900, Andi Shyti wrote: > Even though it's quite unlikely to happen in this particular > case, clk_get_rate can return '0' if sdd->src_clk is not set > properly. In that case we would have a clear division by '0'. > I do not think it is possible. if

[PATCH 2/2] spi: s3c64xx: fix potential division by zero

2017-02-07 Thread Andi Shyti
Even though it's quite unlikely to happen in this particular case, clk_get_rate can return '0' if sdd->src_clk is not set properly. In that case we would have a clear division by '0'. Check the return value of clk_get_rate and fail in case it returns '0'. This patch fixes '1397922 Division or

[PATCH 2/2] spi: s3c64xx: fix potential division by zero

2017-02-07 Thread Andi Shyti
Even though it's quite unlikely to happen in this particular case, clk_get_rate can return '0' if sdd->src_clk is not set properly. In that case we would have a clear division by '0'. Check the return value of clk_get_rate and fail in case it returns '0'. This patch fixes '1397922 Division or