diff for duplicates of <bdeb697f-4e6a-bf64-112b-907e3c298a29@users.sourceforge.net> diff --git a/a/1.txt b/N1/1.txt index a9519c4..bf1f873 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -6,7 +6,7 @@ Content-Transfer-Encoding: 8bit The script "checkpatch.pl" pointed information out like the following. -Comparison to NULL could be written … +Comparison to NULL could be written … Thus fix the affected source code places. @@ -23,7 +23,7 @@ index 0ed3453b1c75..617f2090aa55 100644 } } -- if (format = NULL) +- if (format == NULL) + if (!format) return; @@ -32,7 +32,7 @@ index 0ed3453b1c75..617f2090aa55 100644 } } -- if (frame = NULL) +- if (frame == NULL) + if (!frame) return; @@ -41,7 +41,7 @@ index 0ed3453b1c75..617f2090aa55 100644 return -EIO; data = kmalloc(size, GFP_KERNEL); -- if (data = NULL) +- if (data == NULL) + if (!data) return -ENOMEM; @@ -50,7 +50,7 @@ index 0ed3453b1c75..617f2090aa55 100644 size = stream->dev->uvc_version >= 0x0110 ? 34 : 26; data = kzalloc(size, GFP_KERNEL); -- if (data = NULL) +- if (data == NULL) + if (!data) return -ENOMEM; @@ -68,7 +68,7 @@ index 0ed3453b1c75..617f2090aa55 100644 clock->samples = kmalloc_array(clock->size, sizeof(*clock->samples), GFP_KERNEL); -- if (clock->samples = NULL) +- if (clock->samples == NULL) + if (!clock->samples) return -ENOMEM; @@ -77,7 +77,7 @@ index 0ed3453b1c75..617f2090aa55 100644 /* Store the payload FID bit and return immediately when the buffer is * NULL. */ -- if (buf = NULL) { +- if (buf == NULL) { + if (!buf) { stream->last_fid = fid; return -ENODATA; @@ -92,10 +92,10 @@ index 0ed3453b1c75..617f2090aa55 100644 continue; } @@ -1233,7 +1233,7 @@ static void uvc_video_decode_bulk(struct urb *urb, struct uvc_streaming *stream, - } while (ret = -EAGAIN); + } while (ret == -EAGAIN); /* If an error occurred skip the rest of the payload. */ -- if (ret < 0 || buf = NULL) { +- if (ret < 0 || buf == NULL) { + if (ret < 0 || !buf) { stream->bulk.skip_payload = 1; } else { @@ -117,12 +117,12 @@ index 0ed3453b1c75..617f2090aa55 100644 + if (!stream->bulk.skip_payload && buf) { uvc_video_decode_end(stream, buf, stream->bulk.header, stream->bulk.payload_size); - if (buf->state = UVC_BUF_STATE_READY) + if (buf->state == UVC_BUF_STATE_READY) @@ -1278,7 +1278,7 @@ static void uvc_video_encode_bulk(struct urb *urb, struct uvc_streaming *stream, u8 *mem = urb->transfer_buffer; int len = stream->urb_size, ret; -- if (buf = NULL) { +- if (buf == NULL) { + if (!buf) { urb->transfer_buffer_length = 0; return; @@ -131,7 +131,7 @@ index 0ed3453b1c75..617f2090aa55 100644 for (i = 0; i < UVC_URBS; ++i) { urb = stream->urb[i]; -- if (urb = NULL) +- if (urb == NULL) + if (!urb) continue; @@ -140,7 +140,7 @@ index 0ed3453b1c75..617f2090aa55 100644 for (i = 0; i < UVC_URBS; ++i) { urb = usb_alloc_urb(npackets, gfp_flags); -- if (urb = NULL) { +- if (urb == NULL) { + if (!urb) { uvc_uninit_video(stream, 1); return -ENOMEM; @@ -149,7 +149,7 @@ index 0ed3453b1c75..617f2090aa55 100644 for (i = 0; i < UVC_URBS; ++i) { urb = usb_alloc_urb(0, gfp_flags); -- if (urb = NULL) { +- if (urb == NULL) { + if (!urb) { uvc_uninit_video(stream, 1); return -ENOMEM; @@ -158,7 +158,7 @@ index 0ed3453b1c75..617f2090aa55 100644 alts = &intf->altsetting[i]; ep = uvc_find_endpoint(alts, stream->header.bEndpointAddress); -- if (ep = NULL) +- if (ep == NULL) + if (!ep) continue; @@ -167,7 +167,7 @@ index 0ed3453b1c75..617f2090aa55 100644 } } -- if (best_ep = NULL) { +- if (best_ep == NULL) { + if (!best_ep) { uvc_trace(UVC_TRACE_VIDEO, "No fast enough alt setting for requested bandwidth.\n"); @@ -176,15 +176,10 @@ index 0ed3453b1c75..617f2090aa55 100644 /* Bulk endpoint, proceed to URB initialization. */ ep = uvc_find_endpoint(&intf->altsetting[0], stream->header.bEndpointAddress); -- if (ep = NULL) +- if (ep == NULL) + if (!ep) return -EIO; ret = uvc_init_video_bulk(stream, ep, gfp_flags); -- 2.11.0 - --- -To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N1/content_digest index 6f25fc4..b1160e8 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\047aa4314-74ec-b2bf-ee3b-aad4d6e9f0a2@users.sourceforge.net\0" "From\0SF Markus Elfring <elfring@users.sourceforge.net>\0" "Subject\0[PATCH 16/19] [media] uvc_video: Adjust 18 checks for null pointers\0" - "Date\0Sun, 25 Dec 2016 18:49:01 +0000\0" + "Date\0Sun, 25 Dec 2016 19:49:01 +0100\0" "To\0linux-media@vger.kernel.org" Laurent Pinchart <laurent.pinchart@ideasonboard.com> " Mauro Carvalho Chehab <mchehab@kernel.org>\0" @@ -17,7 +17,7 @@ "\n" "The script \"checkpatch.pl\" pointed information out like the following.\n" "\n" - "Comparison to NULL could be written \303\242\342\202\254\302\246\n" + "Comparison to NULL could be written \342\200\246\n" "\n" "Thus fix the affected source code places.\n" "\n" @@ -34,7 +34,7 @@ " \t\t}\n" " \t}\n" " \n" - "-\tif (format = NULL)\n" + "-\tif (format == NULL)\n" "+\tif (!format)\n" " \t\treturn;\n" " \n" @@ -43,7 +43,7 @@ " \t\t}\n" " \t}\n" " \n" - "-\tif (frame = NULL)\n" + "-\tif (frame == NULL)\n" "+\tif (!frame)\n" " \t\treturn;\n" " \n" @@ -52,7 +52,7 @@ " \t\treturn -EIO;\n" " \n" " \tdata = kmalloc(size, GFP_KERNEL);\n" - "-\tif (data = NULL)\n" + "-\tif (data == NULL)\n" "+\tif (!data)\n" " \t\treturn -ENOMEM;\n" " \n" @@ -61,7 +61,7 @@ " \n" " \tsize = stream->dev->uvc_version >= 0x0110 ? 34 : 26;\n" " \tdata = kzalloc(size, GFP_KERNEL);\n" - "-\tif (data = NULL)\n" + "-\tif (data == NULL)\n" "+\tif (!data)\n" " \t\treturn -ENOMEM;\n" " \n" @@ -79,7 +79,7 @@ " \tclock->samples = kmalloc_array(clock->size,\n" " \t\t\t\t sizeof(*clock->samples),\n" " \t\t\t\t GFP_KERNEL);\n" - "-\tif (clock->samples = NULL)\n" + "-\tif (clock->samples == NULL)\n" "+\tif (!clock->samples)\n" " \t\treturn -ENOMEM;\n" " \n" @@ -88,7 +88,7 @@ " \t/* Store the payload FID bit and return immediately when the buffer is\n" " \t * NULL.\n" " \t */\n" - "-\tif (buf = NULL) {\n" + "-\tif (buf == NULL) {\n" "+\tif (!buf) {\n" " \t\tstream->last_fid = fid;\n" " \t\treturn -ENODATA;\n" @@ -103,10 +103,10 @@ " \t\t\tcontinue;\n" " \t\t}\n" "@@ -1233,7 +1233,7 @@ static void uvc_video_decode_bulk(struct urb *urb, struct uvc_streaming *stream,\n" - " \t\t} while (ret = -EAGAIN);\n" + " \t\t} while (ret == -EAGAIN);\n" " \n" " \t\t/* If an error occurred skip the rest of the payload. */\n" - "-\t\tif (ret < 0 || buf = NULL) {\n" + "-\t\tif (ret < 0 || buf == NULL) {\n" "+\t\tif (ret < 0 || !buf) {\n" " \t\t\tstream->bulk.skip_payload = 1;\n" " \t\t} else {\n" @@ -128,12 +128,12 @@ "+\t\tif (!stream->bulk.skip_payload && buf) {\n" " \t\t\tuvc_video_decode_end(stream, buf, stream->bulk.header,\n" " \t\t\t\tstream->bulk.payload_size);\n" - " \t\t\tif (buf->state = UVC_BUF_STATE_READY)\n" + " \t\t\tif (buf->state == UVC_BUF_STATE_READY)\n" "@@ -1278,7 +1278,7 @@ static void uvc_video_encode_bulk(struct urb *urb, struct uvc_streaming *stream,\n" " \tu8 *mem = urb->transfer_buffer;\n" " \tint len = stream->urb_size, ret;\n" " \n" - "-\tif (buf = NULL) {\n" + "-\tif (buf == NULL) {\n" "+\tif (!buf) {\n" " \t\turb->transfer_buffer_length = 0;\n" " \t\treturn;\n" @@ -142,7 +142,7 @@ " \n" " \tfor (i = 0; i < UVC_URBS; ++i) {\n" " \t\turb = stream->urb[i];\n" - "-\t\tif (urb = NULL)\n" + "-\t\tif (urb == NULL)\n" "+\t\tif (!urb)\n" " \t\t\tcontinue;\n" " \n" @@ -151,7 +151,7 @@ " \n" " \tfor (i = 0; i < UVC_URBS; ++i) {\n" " \t\turb = usb_alloc_urb(npackets, gfp_flags);\n" - "-\t\tif (urb = NULL) {\n" + "-\t\tif (urb == NULL) {\n" "+\t\tif (!urb) {\n" " \t\t\tuvc_uninit_video(stream, 1);\n" " \t\t\treturn -ENOMEM;\n" @@ -160,7 +160,7 @@ " \n" " \tfor (i = 0; i < UVC_URBS; ++i) {\n" " \t\turb = usb_alloc_urb(0, gfp_flags);\n" - "-\t\tif (urb = NULL) {\n" + "-\t\tif (urb == NULL) {\n" "+\t\tif (!urb) {\n" " \t\t\tuvc_uninit_video(stream, 1);\n" " \t\t\treturn -ENOMEM;\n" @@ -169,7 +169,7 @@ " \t\t\talts = &intf->altsetting[i];\n" " \t\t\tep = uvc_find_endpoint(alts,\n" " \t\t\t\tstream->header.bEndpointAddress);\n" - "-\t\t\tif (ep = NULL)\n" + "-\t\t\tif (ep == NULL)\n" "+\t\t\tif (!ep)\n" " \t\t\t\tcontinue;\n" " \n" @@ -178,7 +178,7 @@ " \t\t\t}\n" " \t\t}\n" " \n" - "-\t\tif (best_ep = NULL) {\n" + "-\t\tif (best_ep == NULL) {\n" "+\t\tif (!best_ep) {\n" " \t\t\tuvc_trace(UVC_TRACE_VIDEO,\n" " \t\t\t\t \"No fast enough alt setting for requested bandwidth.\\n\");\n" @@ -187,17 +187,12 @@ " \t\t/* Bulk endpoint, proceed to URB initialization. */\n" " \t\tep = uvc_find_endpoint(&intf->altsetting[0],\n" " \t\t\t\tstream->header.bEndpointAddress);\n" - "-\t\tif (ep = NULL)\n" + "-\t\tif (ep == NULL)\n" "+\t\tif (!ep)\n" " \t\t\treturn -EIO;\n" " \n" " \t\tret = uvc_init_video_bulk(stream, ep, gfp_flags);\n" "-- \n" - "2.11.0\n" - "\n" - "--\n" - "To unsubscribe from this list: send the line \"unsubscribe kernel-janitors\" in\n" - "the body of a message to majordomo@vger.kernel.org\n" - More majordomo info at http://vger.kernel.org/majordomo-info.html + 2.11.0 -61c4740933bdebcb638a2207dd13e02fd6acc4ccf52be831f86103f53fe3ea42 +8183101b4674d4bbbc0e7078ac503f6a3496dca6f27f856e3da95e5109ce50c4
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.