diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-28 11:46:57 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-23 14:19:55 +0200 |
commit | c38e8657a471e9af42b86009e5d3085031b41fda (patch) | |
tree | b2bb818ff8b099ee5237da0ab3b9db680b520a0b /drivers/media/dvb-frontends/mb86a20s.c | |
parent | media: tc358743: add CEC support (diff) | |
download | linux-c38e8657a471e9af42b86009e5d3085031b41fda.tar.xz linux-c38e8657a471e9af42b86009e5d3085031b41fda.zip |
media: drivers: delete error messages for failed memory allocation
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
[mchehab@s-opensource.com: fold several similar patches into one]
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/mb86a20s.c')
-rw-r--r-- | drivers/media/dvb-frontends/mb86a20s.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c index e8ac8c3e2ec0..340984100aec 100644 --- a/drivers/media/dvb-frontends/mb86a20s.c +++ b/drivers/media/dvb-frontends/mb86a20s.c @@ -2072,11 +2072,8 @@ struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config, /* allocate memory for the internal state */ state = kzalloc(sizeof(struct mb86a20s_state), GFP_KERNEL); - if (state == NULL) { - dev_err(&i2c->dev, - "%s: unable to allocate memory for state\n", __func__); + if (!state) goto error; - } /* setup the state */ state->config = config; |