Skip to content
Commit c7f82ea8 authored by Colin Ian King's avatar Colin Ian King Committed by Wolfram Sang
Browse files

i2c: designware-baytrail: fix potential null pointer dereference on dev



The assignment to addr requires a call to get_sem_addr that dereferences
dev, however, this dereference occurs before a null pointer check on dev.
Move this assignment after the null check on dev to avoid a potential null
pointer dereference.

Detected by CoverityScan, CID#1419700 ("Dereference before null check")

Fixes: fd476fa2 ("i2c: designware-baytrail: Add support for cherrytrail")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent bd698d24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment