usb: gadget: Validate the port number in grmnet_ctrl_smd_port_alloc
usb: gadget: Validate the port number in grmnet_ctrl_smd_port_alloc

Fix code quality issues found by the automatic checking tool.
Verify that port number is within the max port limit before setting it
in grmnet_ctrl_smd_port_alloc.

CRs-Fixed: 566927
Change-Id: Iecc50a98c4e32bd8800ea63de0ccb8aecda78090
Signed-off-by: Danny Segal <900226c7e840b807cfff21860d06d6d4dfc40c7a@codeaurora.org>
Signed-off-by: Maya Erez <25572154eeba72a929e4e8800fea8e07b7f067a8@codeaurora.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas