i2c: mpc: Remove redundant NULL check
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Tue, 13 Apr 2021 05:09:54 +0000 (17:09 +1200)
committerWolfram Sang <wsa@kernel.org>
Tue, 13 Apr 2021 12:23:40 +0000 (14:23 +0200)
commit270282bdf4e5a2484e1244db67e3743cefca6d8f
tree7e78befbd7d41591b42262fe56a397ce105d0040
parent4aa3e48d2e09424449b2e0f2d5581388ba9e261b
i2c: mpc: Remove redundant NULL check

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 redundant so remove the check.

Reported-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-mpc.c