Bluetooth: AT: Fix reset the state during error
Bluetooth: AT: Fix reset the state during error

1. Reset the state when error occurs
2. This patch avoids checking for the AT_STATE_UNSOLICITED_CMD state
as the loop exits with possix error. So check for at->state
AT_STATE_START is sufficient for loop termination.
3. Fix different sign warning.

Change-Id: I80a1ca582112f1783690ac8a4125036bb706705f
Signed-off-by: Sathish Narasimman <788f4f1e1e795a0a40b9b14d104da7375bf0cb35@intel.com>

zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,bboozzoo/zephyr,rsalveti/zephyr,GiulianoFranchetto/zephyr,runchip/zephyr-cc3220,kraj/zephyr,rsalveti/zephyr,bboozzoo/zephyr,nashif/zephyr,pklazy/zephyr,runchip/zephyr-cc3200,aceofall/zephyr-iotos,bboozzoo/zephyr,bboozzoo/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,punitvara/zephyr,runchip/zephyr-cc3200,pklazy/zephyr,GiulianoFranchetto/zephyr,aceofall/zephyr-iotos,punitvara/zephyr,Vudentz/zephyr,punitvara/zephyr,rsalveti/zephyr,zephyriot/zephyr,ldts/zephyr,bigdinotech/zephyr,kraj/zephyr,Vudentz/zephyr,sharronliu/zephyr,galak/zephyr,ldts/zephyr,finikorg/zephyr,explora26/zephyr,mbolivar/zephyr,fbsder/zephyr,finikorg/zephyr,pklazy/zephyr,pklazy/zephyr,zephyrproject-rtos/zephyr,bboozzoo/zephyr,holtmann/zephyr,zephyrproject-rtos/zephyr,fbsder/zephyr,ldts/zephyr,explora26/zephyr,runchip/zephyr-cc3220,fractalclone/zephyr-riscv,runchip/zephyr-cc3200,aceofall/zephyr-iotos,fractalclone/zephyr-riscv,kraj/zephyr,Vudentz/zephyr,zephyriot/zephyr,zephyriot/zephyr,Vudentz/zephyr,ldts/zephyr,fractalclone/zephyr-riscv,sharronliu/zephyr,erwango/zephyr,holtmann/zephyr,zephyriot/zephyr,galak/zephyr,mbolivar/zephyr,sharronliu/zephyr,holtmann/zephyr,erwango/zephyr,holtmann/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,nashif/zephyr,holtmann/zephyr,runchip/zephyr-cc3200,bigdinotech/zephyr,mbolivar/zephyr,fractalclone/zephyr-riscv,erwango/zephyr,fractalclone/zephyr-riscv,galak/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,runchip/zephyr-cc3200,zephyrproject-rtos/zephyr,rsalveti/zephyr,punitvara/zephyr,ldts/zephyr,galak/zephyr,mbolivar/zephyr,fbsder/zephyr,runchip/zephyr-cc3220,aceofall/zephyr-iotos,zephyriot/zephyr,bigdinotech/zephyr,galak/zephyr,runchip/zephyr-cc3220,finikorg/zephyr,bigdinotech/zephyr,kraj/zephyr,explora26/zephyr,Vudentz/zephyr,explora26/zephyr,runchip/zephyr-cc3220,kraj/zephyr,rsalveti/zephyr,explora26/zephyr,sharronliu/zephyr,erwango/zephyr,bigdinotech/zephyr,punitvara/zephyr,aceofall/zephyr-iotos,erwango/zephyr,pklazy/zephyr,mbolivar/zephyr,Vudentz/zephyr,sharronliu/zephyr,fbsder/zephyr,nashif/zephyr,fbsder/zephyr,nashif/zephyr