RE: [usb:usb-next 151/156] drivers/usb/chipidea/usbmisc_imx.c:197 usbmisc_imx53_init() warn: variable dereferenced before check 'reg' (see line 195)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-
> next
> head:   10775eb17bee1ccc02ac22bb85e50699e0576a84
> commit: 33f92a8a926761bfe23d740851d218c0c4eb6463 [151/156] chipidea:
> usbmisc_imx: Allow USB OTG to work on mx51
> 
> drivers/usb/chipidea/usbmisc_imx.c:197 usbmisc_imx53_init() warn:
> variable dereferenced before check 'reg' (see line 195)
> 
> git remote add usb
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
> git remote update usb
> git checkout 33f92a8a926761bfe23d740851d218c0c4eb6463
> vim +/reg +197 drivers/usb/chipidea/usbmisc_imx.c
> 
> f0c910b6 Michael Grzeschik 2013-03-30  189  			reg =
> usbmisc->base + MX53_USB_UH2_CTRL_OFFSET;
> f0c910b6 Michael Grzeschik 2013-03-30  190  			val =
> readl(reg) | MX53_BM_OVER_CUR_DIS_UHx;
> f0c910b6 Michael Grzeschik 2013-03-30  191  			break;
> f0c910b6 Michael Grzeschik 2013-03-30  192  		case 3:
> f0c910b6 Michael Grzeschik 2013-03-30  193  			reg =
> usbmisc->base + MX53_USB_UH3_CTRL_OFFSET;
> f0c910b6 Michael Grzeschik 2013-03-30  194  			val =
> readl(reg) | MX53_BM_OVER_CUR_DIS_UHx;
> f0c910b6 Michael Grzeschik 2013-03-30 @195  			break;
> f0c910b6 Michael Grzeschik 2013-03-30  196  		}
> f0c910b6 Michael Grzeschik 2013-03-30 @197  		if (reg && val)
> f0c910b6 Michael Grzeschik 2013-03-30  198  			writel(val,
> reg);
> f0c910b6 Michael Grzeschik 2013-03-30  199
> 	spin_unlock_irqrestore(&usbmisc->lock, flags);
> f0c910b6 Michael Grzeschik 2013-03-30  200  	}
> 
 
Would anyone can help me explain this warning, please?

Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux