From 9011876d1b261094fdeb3a1f1fec136f0d8976a8 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Wed, 2 Sep 2015 22:03:05 +0200 Subject: [PATCH] drop inconsistent null check We do not check dev for null in any of the other functions. If it was actually null then we would also already have got a null pointer dereference earlier in the function. --- src/hidpp10.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hidpp10.c b/src/hidpp10.c index 950b1f5e..c3cacd7c 100644 --- a/src/hidpp10.c +++ b/src/hidpp10.c @@ -294,8 +294,7 @@ hidpp10_set_individual_feature(struct hidpp10_device *dev, log_raw(dev->ratbag_device->ratbag, "Setting individual features\n"); - if (dev) - mode.msg.device_idx = dev->index; + mode.msg.device_idx = dev->index; mode.msg.parameters[0] = feature_bit_r0; mode.msg.parameters[1] = feature_bit_r2;