Skip to contentSkip to conversation

omapdrm: hdmi4_cec: signedness bug in hdmi4_cec_init()

PATCH In review Dan Carpenter 4 participants 4 messages Oct 27, 2017 – Nov 21, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omapdrm: hdmi4_cec: signedness bug in hdmi4_cec_init()

"ret" needs to be signed for the error handling to work.

Fixes 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")
drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c +1 -1
index d86873f2abe6..e626eddf24d5 100644
@@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
 {
 	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
 			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
-	unsigned int ret;
+	int ret;
 
 	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
 		"omap4", caps, CEC_MAX_LOG_ADDRS);
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 4 lines · Dan Carpenter

"ret" needs to be signed for the error handling to work.

Fixes 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")

-- Sebastian

Quoted 17 lines
drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c +1 -1
index d86873f2abe6..e626eddf24d5 100644
@@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
 {
 	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
 			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
-	unsigned int ret;
+	int ret;
 
 	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
 		"omap4", caps, CEC_MAX_LOG_ADDRS);

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Dan Carpenter
Quoted 4 lines · Dan Carpenter

"ret" needs to be signed for the error handling to work.

Fixes 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")

Oops! Not sure how that crept in.

Thanks!

Hans

Quoted 19 lines
drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c +1 -1
index d86873f2abe6..e626eddf24d5 100644
@@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
 {
 	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
 			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
-	unsigned int ret;
+	int ret;
 
 	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
 		"omap4", caps, CEC_MAX_LOG_ADDRS);

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to Dan Carpenter
Quoted 11 lines · Dan Carpenter

"ret" needs to be signed for the error handling to work.

Fixes 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")
drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c +0 -0
index d86873f2abe6..e626eddf24d5 100644

drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core, · line 358

Quoted 8 lines
drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c +1 -1
@@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
 {
 	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
 			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
-	unsigned int ret;
+	int ret;
 
 	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
 		"omap4", caps, CEC_MAX_LOG_ADDRS);

Thanks. I have picked this up.

Tomi

Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki