Showing error 1069

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: drivers/net/wireless/orinoco.h
Line in file: 204
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

174#endif        /* ORINOCO_DEBUG */
175
176/********************************************************************/
177/* Exported prototypes                                              */
178/********************************************************************/
179
180extern struct net_device *alloc_orinocodev(
181        int sizeof_card, struct device *device,
182        int (*hard_reset)(struct orinoco_private *),
183        int (*stop_fw)(struct orinoco_private *, int));
184extern void free_orinocodev(struct net_device *dev);
185extern int __orinoco_up(struct net_device *dev);
186extern int __orinoco_down(struct net_device *dev);
187extern int orinoco_reinit_firmware(struct net_device *dev);
188extern irqreturn_t orinoco_interrupt(int irq, void * dev_id);
189
190/********************************************************************/
191/* Locking and synchronization functions                            */
192/********************************************************************/
193
194static inline int orinoco_lock(struct orinoco_private *priv,
195                               unsigned long *flags)
196{
197        spin_lock_irqsave(&priv->lock, *flags);
198        if (priv->hw_unavailable) {
199                DEBUG(1, "orinoco_lock() called with hw_unavailable (dev=%p)\n",
200                       priv->ndev);
201                spin_unlock_irqrestore(&priv->lock, *flags);
202                return -EBUSY;
203        }
204        return 0;
205}
206
207static inline void orinoco_unlock(struct orinoco_private *priv,
208                                  unsigned long *flags)
209{
210        spin_unlock_irqrestore(&priv->lock, *flags);
211}
212
213#endif /* _ORINOCO_H */
Show full sources