diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-04-24 14:43:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-04 18:41:48 +0200 |
commit | a0e244ec59bdc4caac4b7a105f029fd1af28f0f2 (patch) | |
tree | 0ea25625275b2cf678774ad55704ac2e40bce823 /drivers/staging | |
parent | 62cbabc6fd228e62daff6ec108fae35632e2b692 (diff) | |
download | linux-a0e244ec59bdc4caac4b7a105f029fd1af28f0f2.tar.gz linux-a0e244ec59bdc4caac4b7a105f029fd1af28f0f2.tar.bz2 linux-a0e244ec59bdc4caac4b7a105f029fd1af28f0f2.zip |
staging: vc04_services: Delete unnecessary NULL check
The "state" pointer points to an offset in the middle of the "mgmt"
struct so it can't possibly be NULL. And also we dereferenced it on the
line before. So this NULL check is pointless. Delete it.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/526ec2ff-6277-4d5d-b2d9-63b087a97c7c@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c index 9fe35864936c..3c63347d2d08 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c @@ -1170,11 +1170,6 @@ static int vchiq_open(struct inode *inode, struct file *file) dev_dbg(state->dev, "arm: vchiq open\n"); - if (!state) { - dev_err(state->dev, "arm: vchiq has no connection to VideoCore\n"); - return -ENOTCONN; - } - instance = kzalloc(sizeof(*instance), GFP_KERNEL); if (!instance) return -ENOMEM; |