Re: [PATCH] [media] ov2640: make GPIOLIB an optional dependency

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

 



On Mon, Apr 24, 2017 at 08:38:47PM +0300, Sakari Ailus wrote:
...
> ret won't be zero here, that was checked above. You could check for just ret
> though, it'd be easier to read that way.

I missed ret would have to have type long instead. How about:

ret = PTR_ERR(priv->reset_gpio);
if (!priv->reset_gpio) {
	dev_dbg("reset gpio is not assigned\n");
} else if (IS_ERR(priv->reset_gpio) && ret != -ENOSYS) {
	dev_dbg("error %d while getting reset gpio", ret);
	return ret;
}

-- 
Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux