lkml.org 
[lkml]   [2021]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/6] i2c: mpc: make interrupt mandatory and remove polling code
On Mon, Mar 29, 2021 at 02:52:04PM +1300, Chris Packham wrote:
> All the in-tree dts files that use one of the compatible strings from
> i2c-mpc.c provide an interrupt property. By making this mandatory we
> can simplify the code.
>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

After I applied this patch, cppcheck reports:

CPPCHECK
drivers/i2c/busses/i2c-mpc.c:401:47: warning: Either the condition 'div?(int)div->fdr:-EINVAL' is redundant or there is possible null pointer dereference: div. [nullPointerRedundantCheck]
*real_clk = fsl_get_sys_freq() / prescaler / div->divider;
^
drivers/i2c/busses/i2c-mpc.c:402:13: note: Assuming that condition 'div?(int)div->fdr:-EINVAL' is not redundant
return div ? (int)div->fdr : -EINVAL;
^
drivers/i2c/busses/i2c-mpc.c:401:47: note: Null pointer dereference
*real_clk = fsl_get_sys_freq() / prescaler / div->divider;
^
Can you check this? I'd think we can fix it incrementally...

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-04-10 22:19    [W:0.520 / U:1.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site