dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* nouveau nvaa clock missing break?
@ 2013-12-26 19:51 Kees Cook
  2013-12-27 10:05 ` Roy Spliet
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2013-12-26 19:51 UTC (permalink / raw)
  To: Roy Spliet; +Cc: Ben Skeggs, LKML, dri-devel

Hi,

Just curious if this code is missing a "break" or not...

/drivers/gpu/drm/nouveau/core/subdev/clock/nvaa.c: 373 in nvaa_clock_prog()

        switch (priv->vsrc) {
        case nv_clk_src_cclk:
                mast |= 0x00400000;
        default:
                nv_wr32(clk, 0x4600, priv->vdiv);
        }

Coverity noticed it as CID 1135671. If it's intentional, it might be
nice to add a "fall through" comment there.

Coverity also complained about read_pll (CID 1135670) where post_div
could (unlikely) be 0 and used for a divide-by-zero.

Thanks!

-Kees

-- 
Kees Cook
Chrome OS Security

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-27 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-26 19:51 nouveau nvaa clock missing break? Kees Cook
2013-12-27 10:05 ` Roy Spliet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).