stm class: Remove unnecessary pointer increment
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 4 Mar 2016 14:55:12 +0000 (16:55 +0200)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 1 Jun 2016 21:42:53 +0000 (15:42 -0600)
Readability: a postfix increment is used on a pointer which is not
used anywhere afterwards, which may send the reader looking through
the function one extra time. Drop the unnecessary increment.

Reported-by: Alan Cox <alan.cox@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Laurent Fert <laurent.fert@intel.com>
(cherry picked from commit fb0801904bbbc7b109d4009520c7fa34bcfb7450)

drivers/hwtracing/stm/policy.c

index 1db189657b2b01b194a2e06aafbd79be872fb027..1c061cb9bff05ff7a0923dca13bbc1b5a2104c3b 100644 (file)
@@ -342,7 +342,7 @@ stp_policies_make(struct config_group *group, const char *name)
                return ERR_PTR(-EINVAL);
        }
 
-       *p++ = '\0';
+       *p = '\0';
 
        stm = stm_find_device(devname);
        kfree(devname);