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

Commit 2537befd authored by Pratham Pratap's avatar Pratham Pratap
Browse files

USB: gadget: qti: Fix compilation issue for llvm config



Commit 00b09723 ("USB: gadget: qti: Fix NULL check for
usb_pid_string") performs a NULL check for the value which
usb_pid_string is pointing. This check performs a comparison
between char and void* which throws a warning during
compilation. If llvm config is enabled this warning is
treated as a fatal error and compilation fails. Fix this
by adding explicit check for usb_pid_string[0] against zero.

Change-Id: I84b4ed53e400a5702d87f851c724126a3f817d64
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 37e7a537
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ static int qti_gadget_get_properties(struct qti_usb_gadget *gadget)
		gadget->cdev.desc.bDeviceProtocol = (u8)val;

	/* Check if pid passed via cmdline which takes precedence */
	if (usb_pid_string[0] != NULL) {
	if (usb_pid_string[0] != 0) {
		ret = kstrtoint(usb_pid_string, 16, &val);
		if (ret)
			return ret;