Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / drivers / hwmon / occ / p9_sbe.c
index a91937e28e12bf634a8466ad9e181e684a747ade..c1e0a1d96cd47a3479dedfebe7aba171caf3acd8 100644 (file)
@@ -55,8 +55,7 @@ static bool p9_sbe_occ_save_ffdc(struct p9_sbe_occ *ctx, const void *resp,
        mutex_lock(&ctx->sbe_error_lock);
        if (!ctx->sbe_error) {
                if (resp_len > ctx->ffdc_size) {
-                       if (ctx->ffdc)
-                               kvfree(ctx->ffdc);
+                       kvfree(ctx->ffdc);
                        ctx->ffdc = kvmalloc(resp_len, GFP_KERNEL);
                        if (!ctx->ffdc) {
                                ctx->ffdc_len = 0;
@@ -170,8 +169,7 @@ static int p9_sbe_occ_remove(struct platform_device *pdev)
        ctx->sbe = NULL;
        occ_shutdown(occ);
 
-       if (ctx->ffdc)
-               kvfree(ctx->ffdc);
+       kvfree(ctx->ffdc);
 
        return 0;
 }