Commit c155a47d authored by Masahiro Yamada's avatar Masahiro Yamada

modpost: do not write out any file when error occurred

If an error occurs, modpost will fail anyway. Do not write out
any content (, which might be invalid).
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 15a28c7c
......@@ -2333,6 +2333,9 @@ static void write_buf(struct buffer *b, const char *fname)
{
FILE *file;
if (error_occurred)
return;
file = fopen(fname, "w");
if (!file) {
perror(fname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment