mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
[media] media: tuners: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
18552ea132
commit
f1065c9648
1 changed files with 1 additions and 2 deletions
|
@ -1378,8 +1378,7 @@ static int xc2028_set_config(struct dvb_frontend *fe, void *priv_cfg)
|
||||||
* For the firmware name, keep a local copy of the string,
|
* For the firmware name, keep a local copy of the string,
|
||||||
* in order to avoid troubles during device release.
|
* in order to avoid troubles during device release.
|
||||||
*/
|
*/
|
||||||
if (priv->ctrl.fname)
|
kfree(priv->ctrl.fname);
|
||||||
kfree(priv->ctrl.fname);
|
|
||||||
memcpy(&priv->ctrl, p, sizeof(priv->ctrl));
|
memcpy(&priv->ctrl, p, sizeof(priv->ctrl));
|
||||||
if (p->fname) {
|
if (p->fname) {
|
||||||
priv->ctrl.fname = kstrdup(p->fname, GFP_KERNEL);
|
priv->ctrl.fname = kstrdup(p->fname, GFP_KERNEL);
|
||||||
|
|
Loading…
Reference in a new issue