Op 20-11-2024 om 18:04 schreef Dan Carpenter:
On Wed, Nov 20, 2024 at 03:46:53PM +0100, Paolo Perego wrote:
This commit fixes a dereference before null check issue discovered by
Coverity (CID 1601566).
The check ad line 1450 suggests that a_priv can be NULL, however it has
been derefenced before, in the interface_to_usbdev() call.
Signed-off-by: Paolo Perego <pperego@xxxxxxx>
---
You need a Fixes tag. But I'm pretty sure the correct fix is to remove the NULL
check.
In the whole agilent_82357a.c module there is no consistency whether
board->private_data needs to be checked for a NULL or not.
If Dan is correct then it is better to drop the NULL check, not only here
but in a few more places as well. There are at least 10 functions were
there is no NULL check for private_data.
Run this command and you'll see what I mean
git grep -3 -e '->private_data' -- drivers/staging/gpib/agilent_82357a
regards,
dan carpenter