Re: [PATCH v3 3/4] i2c: mpc: Remove redundant NULL check

2021-04-13 Thread Wolfram Sang
On Tue, Apr 13, 2021 at 05:09:54PM +1200, Chris Packham wrote: > In mpc_i2c_get_fdr_8xxx div is assigned as we iterate through the > mpc_i2c_dividers_8xxx array. By the time we exit the loop div will > either have the value that matches the requested speed or be pointing at > the last entry in

[PATCH v3 3/4] i2c: mpc: Remove redundant NULL check

2021-04-12 Thread Chris Packham
In mpc_i2c_get_fdr_8xxx div is assigned as we iterate through the mpc_i2c_dividers_8xxx array. By the time we exit the loop div will either have the value that matches the requested speed or be pointing at the last entry in mpc_i2c_dividers_8xxx. Checking for div being NULL after the loop is