media: common: saa7146: Avoid a leak in vmalloc_to_sg()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 25 Apr 2023 13:25:46 +0000 (15:25 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 25 May 2023 14:21:20 +0000 (16:21 +0200)
commitb2aa8ac6f97e26d788948fb60dcc5625c9633f4e
tree2a44247d41901da394623937661fce4c78446357
parent4a35700018065a3f40b9d5dd84829f7086594c9f
media: common: saa7146: Avoid a leak in vmalloc_to_sg()

Commit in Fixes turned a BUG() into a "normal" memory allocation failure.
While at it, it introduced a memory leak.
So fix it.

Also update the comment on top of the function to reflect what has been
change by the commit in Fixes.

Fixes: 40e986c99624 ("media: common: saa7146: replace BUG_ON by WARN_ON")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/common/saa7146/saa7146_core.c