diff options
author | Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> | 2023-07-18 17:06:58 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-07-19 13:57:51 +0300 |
commit | 4b9fbbd58e35337d59431e988149930c1987dc30 (patch) | |
tree | 83a9cfe5a40e51cdf8003b704797f7d08db2d84e /drivers/media/i2c/ds90ub953.c | |
parent | 37048e171cda6f000b97b4b4931659254db8f63d (diff) | |
download | linux-4b9fbbd58e35337d59431e988149930c1987dc30.tar.xz |
media: i2c: ds90ub960: fix error handling in ub960_rxport_add_serializer()
Smatch warns:
drivers/media/i2c/ds90ub960.c:1671 ub960_rxport_add_serializer():
err: 'rxport->ser.client' dereferencing possible ERR_PTR()
i2c_new_client_device() returns error pointers on failure and in
dev_dbg statement we are dereferencing error pointer which is a bug.
Fix this by using IS_ERR() which checks for error pointers.
Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c/ds90ub953.c')
0 files changed, 0 insertions, 0 deletions