diff options
author | Pavel Machek <pavel@ucw.cz> | 2020-09-20 11:01:37 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-27 11:29:45 +0200 |
commit | b28e32798c78a346788d412f1958f36bb760ec03 (patch) | |
tree | d198744fe253817892feaa1c92619096c180e2cd /drivers/media | |
parent | media: rcar-vin: Extend RAW8 support to all RGB layouts (diff) | |
download | linux-b28e32798c78a346788d412f1958f36bb760ec03.tar.xz linux-b28e32798c78a346788d412f1958f36bb760ec03.zip |
media: firewire: fix memory leak
Fix memory leak in node_probe.
Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/firewire/firedtv-fw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/firewire/firedtv-fw.c b/drivers/media/firewire/firedtv-fw.c index 3f1ca40b9b98..8a8585261bb8 100644 --- a/drivers/media/firewire/firedtv-fw.c +++ b/drivers/media/firewire/firedtv-fw.c @@ -272,8 +272,10 @@ static int node_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) name_len = fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)); - if (name_len < 0) - return name_len; + if (name_len < 0) { + err = name_len; + goto fail_free; + } for (i = ARRAY_SIZE(model_names); --i; ) if (strlen(model_names[i]) <= name_len && strncmp(name, model_names[i], name_len) == 0) |