From: Michael Krufky Date: Wed, 9 Nov 2005 05:35:48 +0000 (-0800) Subject: [PATCH] dvb: nxt200x: remove null check before kfree() X-Git-Tag: v2.6.15-rc1~326 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d35ae3d1137c92a315b7ff10aecd45b1f37d99e;p=linux-2.6 [PATCH] dvb: nxt200x: remove null check before kfree() Removed unnecessary null check before kfree() ...inspired by the big patch from Jesper Juhl. Signed-off-by: Michael Krufky Cc: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c index d1b9f8b9b4..97ee8017da 100644 --- a/drivers/media/dvb/frontends/nxt200x.c +++ b/drivers/media/dvb/frontends/nxt200x.c @@ -1159,8 +1159,7 @@ struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, return &state->frontend; error: - if (state) - kfree(state); + kfree(state); printk("Unknown/Unsupported NXT chip: %02X %02X %02X %02X %02X\n", buf[0], buf[1], buf[2], buf[3], buf[4]); return NULL;