Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3b80983 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] pulse8-cec: fix compiler warning



pulse8-cec.c: In function 'pulse8_connect':
pulse8-cec.c:447:2: warning: 'pa' may be used uninitialized in this function [-Wmaybe-uninitialized]
  cec_s_phys_addr(pulse8->adap, pa, false);
  ^
pulse8-cec.c:609:6: note: 'pa' was declared here
  u16 pa;
      ^

As far as I can tell, this can't actually happen. Still, it is better to just
initialize it.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 34b27b13
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -606,7 +606,7 @@ static int pulse8_connect(struct serio *serio, struct serio_driver *drv)
	struct pulse8 *pulse8;
	struct pulse8 *pulse8;
	int err = -ENOMEM;
	int err = -ENOMEM;
	struct cec_log_addrs log_addrs = {};
	struct cec_log_addrs log_addrs = {};
	u16 pa;
	u16 pa = CEC_PHYS_ADDR_INVALID;


	pulse8 = kzalloc(sizeof(*pulse8), GFP_KERNEL);
	pulse8 = kzalloc(sizeof(*pulse8), GFP_KERNEL);