.. | .. |
---|
1052 | 1052 | v4l2_err(&dev->v4l2_dev, "error loading Huffman tables\n"); |
---|
1053 | 1053 | return ret; |
---|
1054 | 1054 | } |
---|
1055 | | - if (!ctx->params.jpeg_qmat_tab[0]) |
---|
| 1055 | + if (!ctx->params.jpeg_qmat_tab[0]) { |
---|
1056 | 1056 | ctx->params.jpeg_qmat_tab[0] = kmalloc(64, GFP_KERNEL); |
---|
1057 | | - if (!ctx->params.jpeg_qmat_tab[1]) |
---|
| 1057 | + if (!ctx->params.jpeg_qmat_tab[0]) |
---|
| 1058 | + return -ENOMEM; |
---|
| 1059 | + } |
---|
| 1060 | + if (!ctx->params.jpeg_qmat_tab[1]) { |
---|
1058 | 1061 | ctx->params.jpeg_qmat_tab[1] = kmalloc(64, GFP_KERNEL); |
---|
| 1062 | + if (!ctx->params.jpeg_qmat_tab[1]) |
---|
| 1063 | + return -ENOMEM; |
---|
| 1064 | + } |
---|
1059 | 1065 | coda_set_jpeg_compression_quality(ctx, ctx->params.jpeg_quality); |
---|
1060 | 1066 | |
---|
1061 | 1067 | return 0; |
---|